mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 18:35:32 +00:00
add additional constructor to BaseChainDB
This commit is contained in:
parent
93a05ad513
commit
f732cba0c3
@ -43,6 +43,18 @@ proc newBaseChainDB*(
|
|||||||
result.config = params.config
|
result.config = params.config
|
||||||
result.genesis = params.genesis
|
result.genesis = params.genesis
|
||||||
|
|
||||||
|
proc newBaseChainDB*(
|
||||||
|
db: TrieDatabaseRef,
|
||||||
|
config: ChainConfig,
|
||||||
|
pruneTrie: bool = true,
|
||||||
|
id: NetworkId = MainNet): BaseChainDB =
|
||||||
|
|
||||||
|
new(result)
|
||||||
|
result.db = db
|
||||||
|
result.pruneTrie = pruneTrie
|
||||||
|
result.networkId = id
|
||||||
|
result.config = config
|
||||||
|
|
||||||
proc `$`*(db: BaseChainDB): string =
|
proc `$`*(db: BaseChainDB): string =
|
||||||
result = "BaseChainDB"
|
result = "BaseChainDB"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user