Fix clashing import of AccountProof type. (#1962)

* Fix clashing import of AccountProof type.
This commit is contained in:
web3-developer 2024-01-10 16:17:58 +08:00 committed by GitHub
parent e60e5801da
commit a69b1ea90d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ import
stew/results, stew/results,
./state_proof_types, ./state_proof_types,
../../../../stateless/[tree_from_witness, witness_types], ../../../../stateless/[tree_from_witness, witness_types],
../../../../nimbus/db/[core_db, state_db, state_db/base] ../../../../nimbus/db/[core_db, state_db]
export results export results
@ -77,7 +77,7 @@ proc buildAccountsTableFromKeys(
for key in keys: for key in keys:
let account = db.getAccount(key.address) let account = db.getAccount(key.address)
let code = if key.codeLen > 0: let code = if key.codeLen > 0:
db.AccountStateDB.kvt().get(account.codeHash.data) db.getTrie().parent().kvt().get(account.codeHash.data)
else: @[] else: @[]
var storage = initTable[UInt256, UInt256]() var storage = initTable[UInt256, UInt256]()
@ -101,7 +101,7 @@ proc verifyWitness*(
if witness.len() == 0: if witness.len() == 0:
return err("witness is empty") return err("witness is empty")
let db: CoreDbRef = newCoreDbRef(LegacyDbMemory) let db = newCoreDbRef(LegacyDbMemory)
var tb = initTreeBuilder(witness, db, {wfEIP170}) # what flags to use here? var tb = initTreeBuilder(witness, db, {wfEIP170}) # what flags to use here?
try: try:

View File

@ -1,5 +1,5 @@
# Nimbus # Nimbus
# Copyright (c) 2023 Status Research & Development GmbH # Copyright (c) 2023-2024 Status Research & Development GmbH
# Licensed and distributed under either of # Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).