core/state/snapshot: implement storage iterator (#20971)
* core/state/snapshot: implement storage iterator * core/state/snapshot, tests: implement helper function * core/state/snapshot: fix storage issue If an account is deleted in the tx_1 but recreated in the tx_2, the it can happen that in this diff layer, both destructedSet and storageData records this account. In this case, the storage iterator should be able to iterate the slots belong to new account but disable further iteration in deeper layers(belong to old account) * core/state/snapshot: address peter and martin's comment * core/state: address comments * core/state/snapshot: fix test
Showing
- core/state/snapshot/account.go 38 additions, 6 deletionscore/state/snapshot/account.go
- core/state/snapshot/conversion.go 213 additions, 52 deletionscore/state/snapshot/conversion.go
- core/state/snapshot/difflayer.go 28 additions, 13 deletionscore/state/snapshot/difflayer.go
- core/state/snapshot/difflayer_test.go 2 additions, 1 deletioncore/state/snapshot/difflayer_test.go
- core/state/snapshot/generate.go 2 additions, 2 deletionscore/state/snapshot/generate.go
- core/state/snapshot/iterator.go 205 additions, 10 deletionscore/state/snapshot/iterator.go
- core/state/snapshot/iterator_binary.go 116 additions, 24 deletionscore/state/snapshot/iterator_binary.go
- core/state/snapshot/iterator_fast.go 93 additions, 45 deletionscore/state/snapshot/iterator_fast.go
- core/state/snapshot/iterator_test.go 356 additions, 33 deletionscore/state/snapshot/iterator_test.go
- core/state/snapshot/snapshot.go 9 additions, 0 deletionscore/state/snapshot/snapshot.go
- core/state/snapshot/snapshot_test.go 23 additions, 0 deletionscore/state/snapshot/snapshot_test.go
- core/state/statedb.go 1 addition, 1 deletioncore/state/statedb.go
- tests/block_test_util.go 2 additions, 9 deletionstests/block_test_util.go
Loading
Please register or sign in to comment