More comments addressed
This commit is contained in:
parent
39d604a8d7
commit
db62ef132e
|
@ -8,7 +8,7 @@
|
|||
# those terms.
|
||||
|
||||
import parseopt, strutils, macros
|
||||
import asyncdispatch2, eth_keys, eth_p2p, eth_common
|
||||
import asyncdispatch2, eth_keys, eth_p2p, eth_common, chronicles
|
||||
|
||||
const
|
||||
NimbusName* = "Nimbus"
|
||||
|
@ -193,7 +193,9 @@ proc publicChainConfig*(id: PublicNetwork): ChainConfig =
|
|||
byzantiumBlock: 1035301.u256
|
||||
)
|
||||
else:
|
||||
raise newException(Exception, "No chain config for " & $id)
|
||||
error "No chain config for public network", networkId = id
|
||||
doAssert(false, "No chain config for " & $id)
|
||||
ChainConfig()
|
||||
|
||||
result.chainId = uint(id)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func decodePrealloc(data: seq[byte]): GenesisAlloc =
|
|||
for tup in rlp.decode(data.toRange, seq[(UInt256, UInt256)]):
|
||||
result[toAddress(tup[0])] = GenesisAccount(balance: tup[1])
|
||||
|
||||
func defaultGenesisBlockForNetwork*(id: PublicNetwork): Genesis =
|
||||
proc defaultGenesisBlockForNetwork*(id: PublicNetwork): Genesis =
|
||||
result = case id
|
||||
of MainNet:
|
||||
Genesis(
|
||||
|
@ -57,7 +57,10 @@ func defaultGenesisBlockForNetwork*(id: PublicNetwork): Genesis =
|
|||
alloc: decodePrealloc(rinkebyAllocData)
|
||||
)
|
||||
else:
|
||||
raise newException(Exception, "No default genesis for " & $id)
|
||||
# TODO: Fill out the rest
|
||||
error "No default genesis for network", id
|
||||
doAssert(false, "No default genesis for " & $id)
|
||||
Genesis()
|
||||
result.config = publicChainConfig(id)
|
||||
|
||||
proc toBlock*(g: Genesis): BlockHeader =
|
||||
|
|
Loading…
Reference in New Issue