File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed
packages/statemanager/src Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -966,7 +966,7 @@ export class DefaultStateManager implements EVMStateManagerInterface {
966
966
const stream = trie . createReadStream ( )
967
967
968
968
for await ( const chunk of stream ) {
969
- if ( chunk !== null ) storage [ bytesToHex ( chunk . key ) ] = bytesToHex ( chunk . value )
969
+ storage [ bytesToHex ( chunk . key ) ] = bytesToHex ( chunk . value )
970
970
}
971
971
972
972
return storage
@@ -999,26 +999,28 @@ export class DefaultStateManager implements EVMStateManagerInterface {
999
999
const storageMap : StorageRange [ 'storage' ] = { }
1000
1000
const stream = trie . createReadStream ( )
1001
1001
for await ( const chunk of stream ) {
1002
- if ( chunk !== null ) {
1003
- if ( ! inRange ) {
1004
- // Check if the key is already in the correct range.
1005
- if ( bytesToBigInt ( chunk . key ) >= startKey ) {
1006
- inRange = true
1007
- } else {
1008
- continue
1009
- }
1002
+ if ( ! inRange ) {
1003
+ // Check if the key is already in the correct range.
1004
+ if ( bytesToBigInt ( chunk . key ) >= startKey ) {
1005
+ inRange = true
1006
+ } else {
1007
+ continue
1010
1008
}
1011
- if ( i < limit ) {
1012
- storageMap [ bytesToHex ( chunk . key ) ] = { key : null , value : bytesToHex ( chunk . value ) }
1013
- i ++
1014
- } else if ( i === limit ) {
1015
- return {
1016
- storage : storageMap ,
1017
- nextKey : bytesToHex ( chunk . key ) ,
1018
- }
1009
+ }
1010
+ if ( i < limit ) {
1011
+ storageMap [ bytesToHex ( chunk . key ) ] = { key : null , value : bytesToHex ( chunk . value ) }
1012
+ i ++
1013
+ } else if ( i === limit ) {
1014
+ return {
1015
+ storage : storageMap ,
1016
+ nextKey : bytesToHex ( chunk . key ) ,
1019
1017
}
1020
1018
}
1021
1019
}
1020
+ return {
1021
+ storage : storageMap ,
1022
+ nextKey : null ,
1023
+ }
1022
1024
}
1023
1025
1024
1026
/**
You can’t perform that action at this time.
0 commit comments