Skip to content

Commit

Permalink
Use async stream in statemanager
Browse files Browse the repository at this point in the history
  • Loading branch information
scorbajio committed Jan 17, 2024
1 parent 121fd04 commit 962c602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/statemanager/src/stateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ export class DefaultStateManager implements EVMStateManagerInterface {
}
const trie = this._getStorageTrie(address, account)
const storage: StorageDump = {}
const stream = trie.createReadStream()
const stream = trie.createAsyncReadStream()

for await (const chunk of stream) {
storage[bytesToHex(chunk.key)] = bytesToHex(chunk.value)
Expand Down Expand Up @@ -997,7 +997,7 @@ export class DefaultStateManager implements EVMStateManagerInterface {

/** Object conforming to {@link StorageRange.storage}. */
const storageMap: StorageRange['storage'] = {}
const stream = trie.createReadStream()
const stream = trie.createAsyncReadStream()
for await (const chunk of stream) {
if (!inRange) {
// Check if the key is already in the correct range.
Expand Down

0 comments on commit 962c602

Please sign in to comment.