Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2953] Track world state account key preimages #1780

Merged
merged 2 commits into from
Jul 29, 2019

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Jul 29, 2019

PR description

When new accounts are created, save the mapping from addressHash to address in WorldStatePreimageStorage. This allows us to iterate over account values in the world state trie, filling in the account address from the preimage storage.

* @return a stream of all the accounts (in no particular order) contained in the world state
* represented by the root hash of this object at the time of the call.
*/
Stream<Account> streamAccounts();
Stream<Account> streamAccounts(Bytes32 startKeyHash, int limit);
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, I had to fake this out on my end.

@mbaxter mbaxter merged commit 988f1b3 into PegaSysEng:master Jul 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants