ULC mode for Ropsten
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
fecb9bed7e
commit
c081f7f49c
|
@ -70,6 +70,11 @@
|
|||
:config {:NetworkId (ethereum/chain-keyword->chain-id :testnet)
|
||||
:DataDir "/ethereum/testnet"
|
||||
:LightEthConfig {:Enabled true}}}
|
||||
"testnet_ulc" {:id "testnet_ulc",
|
||||
:name "Ropsten ULC",
|
||||
:config {:NetworkId (ethereum/chain-keyword->chain-id :testnet)
|
||||
:DataDir "/ethereum/testnet_ulc"
|
||||
:LightEthConfig {:Enabled true :ULC true}}}
|
||||
"testnet_rpc" {:id "testnet_rpc",
|
||||
:name "Ropsten with upstream RPC",
|
||||
:config {:NetworkId (ethereum/chain-keyword->chain-id :testnet)
|
||||
|
|
|
@ -77,6 +77,16 @@
|
|||
(if utils.platform/desktop? ""
|
||||
config/log-level-status-go)))
|
||||
|
||||
(defn- ulc-network? [config]
|
||||
(get-in config [:LightEthConfig :ULC] false))
|
||||
|
||||
(defn- add-ulc-trusted-nodes [config trusted-nodes]
|
||||
(if (ulc-network? config)
|
||||
(-> config
|
||||
(assoc-in [:LightEthConfig :TrustedNodes] trusted-nodes)
|
||||
(assoc-in [:LightEthConfig :MinTrustedFraction] 50))
|
||||
config))
|
||||
|
||||
(defn- get-account-node-config [db address]
|
||||
(let [accounts (get db :accounts/accounts)
|
||||
current-fleet-key (fleet/current-fleet db address)
|
||||
|
@ -121,6 +131,9 @@
|
|||
use-custom-bootnodes)
|
||||
(add-custom-bootnodes network bootnodes)
|
||||
|
||||
:always
|
||||
(add-ulc-trusted-nodes (vals (:static current-fleet)))
|
||||
|
||||
:always
|
||||
(add-log-level log-level))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue