Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clashing import of AccountProof type. #1962

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

web3-developer
Copy link
Contributor

No description provided.

@@ -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]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state_db/base contains another type named 'AccountProof' which is used in the Nimbus getProof RPC endpoint.

@@ -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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now just using the types defined for the ReadOnlyStateDB type from the state_db import to avoid using AccountStateDB directly.

@web3-developer web3-developer merged commit a69b1ea into master Jan 10, 2024
7 of 8 checks passed
@web3-developer web3-developer deleted the fix-broken-fluffy-build branch January 10, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants