Skip to content

Commit

Permalink
Fix clashing import of AccountProof type. (#1962)
Browse files Browse the repository at this point in the history
* Fix clashing import of AccountProof type.
  • Loading branch information
web3-developer committed Jan 10, 2024
1 parent e60e580 commit a69b1ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import
stew/results,
./state_proof_types,
../../../../stateless/[tree_from_witness, witness_types],
../../../../nimbus/db/[core_db, state_db, state_db/base]
../../../../nimbus/db/[core_db, state_db]

export results

Expand Down Expand Up @@ -77,7 +77,7 @@ proc buildAccountsTableFromKeys(
for key in keys:
let account = db.getAccount(key.address)
let code = if key.codeLen > 0:
db.AccountStateDB.kvt().get(account.codeHash.data)
db.getTrie().parent().kvt().get(account.codeHash.data)
else: @[]
var storage = initTable[UInt256, UInt256]()

Expand All @@ -101,7 +101,7 @@ proc verifyWitness*(
if witness.len() == 0:
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?

try:
Expand Down
2 changes: 1 addition & 1 deletion fluffy/tests/test_state_proof_verification.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2023 Status Research & Development GmbH
# Copyright (c) 2023-2024 Status Research & Development GmbH
# Licensed and distributed under either of
# * 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).
Expand Down

0 comments on commit a69b1ea

Please sign in to comment.