Merge pull request #84 from status-im/fix-seq-init

Workaround for nim issue 7833
This commit is contained in:
Yuriy Glukhov 2018-07-26 17:54:55 +03:00 committed by GitHub
commit 555dcd5a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -255,6 +255,7 @@ proc setNetwork(conf: var NetConfiguration, network: NetworkFlags,
conf.flags.excl({MainNet, MordenNet, RopstenNet, RinkebyNet, KovanNet,
CustomNet})
conf.flags.incl(network)
assert(not conf.bootNodes.isNil) # Nim bug #7833
case network
of MainNet:
conf.networkId = uint(1)
@ -402,6 +403,7 @@ proc initConfiguration(): NimbusConfiguration =
result.rpc.binds = @[initTAddress("127.0.0.1:8545")]
## Network defaults
result.net.bootNodes = @[] # Nim bug #7833
result.net.setNetwork(RopstenNet)
result.net.maxPeers = 25
result.net.maxPendingPeers = 0