-
Notifications
You must be signed in to change notification settings - Fork 759
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
statemanager: small refactor to get storage objects for snapsync #3033
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -375,7 +375,7 @@ export class DefaultStateManager implements EVMStateManagerInterface { | |||
* cache or does a lookup. | |||
* @private | |||
*/ | |||
protected async _getStorageTrie(address: Address, account: Account): Promise<Trie> { | |||
protected _getStorageTrie(address: Address, account: Account): Trie { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function does no actual async call
cf8813c
to
0ec8187
Compare
@@ -802,23 +820,21 @@ export class DefaultStateManager implements EVMStateManagerInterface { | |||
if (!account) { | |||
throw new Error(`dumpStorage f() can only be called for an existing account`) | |||
} | |||
const trie = this._getStorageTrie(address, account) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the diff here is because of pulling this out of the promise below
@@ -841,48 +857,44 @@ export class DefaultStateManager implements EVMStateManagerInterface { | |||
if (!account) { | |||
throw new Error(`Account does not exist.`) | |||
} | |||
const trie = this._getStorageTrie(address, account) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the diff here is because of pulling this out of the promise below
0ec8187
to
235a5fe
Compare
Rebased this via UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevertheless curious: what does this actually do? 😆
to be used in this PR: #3031 to get the account trie, storagetrie and code db from the statemanager for the fetchers to write into, currently snapfetchers just make independent tries
a small refactor to obtain account trie/storagetries and codedb for building state in snapsync PR