core/state: access trie through Database interface, track errors (#14589)
With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
Showing
- accounts/abi/bind/backends/simulated.go 2 additions, 2 deletionsaccounts/abi/bind/backends/simulated.go
- cmd/evm/runner.go 3 additions, 3 deletionscmd/evm/runner.go
- cmd/geth/chaincmd.go 1 addition, 1 deletioncmd/geth/chaincmd.go
- core/block_validator.go 3 additions, 9 deletionscore/block_validator.go
- core/blockchain.go 16 additions, 22 deletionscore/blockchain.go
- core/blockchain_test.go 5 additions, 5 deletionscore/blockchain_test.go
- core/chain_makers.go 2 additions, 2 deletionscore/chain_makers.go
- core/genesis.go 1 addition, 1 deletioncore/genesis.go
- core/state/database.go 154 additions, 0 deletionscore/state/database.go
- core/state/dump.go 1 addition, 1 deletioncore/state/dump.go
- core/state/iterator.go 4 additions, 9 deletionscore/state/iterator.go
- core/state/iterator_test.go 4 additions, 4 deletionscore/state/iterator_test.go
- core/state/managed_state_test.go 1 addition, 1 deletioncore/state/managed_state_test.go
- core/state/state_object.go 34 additions, 22 deletionscore/state/state_object.go
- core/state/state_test.go 17 additions, 22 deletionscore/state/state_test.go
- core/state/statedb.go 32 additions, 107 deletionscore/state/statedb.go
- core/state/statedb_test.go 20 additions, 20 deletionscore/state/statedb_test.go
- core/state/sync_test.go 45 additions, 30 deletionscore/state/sync_test.go
- core/tx_pool_test.go 12 additions, 12 deletionscore/tx_pool_test.go
- core/vm/runtime/runtime.go 2 additions, 2 deletionscore/vm/runtime/runtime.go
Loading
Please register or sign in to comment