aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-23 03:04:58 +0800
committerFelix Lange <fjl@twurst.com>2016-09-26 16:31:18 +0800
commitdc2b23c869a38cf5dce72479593c5ad6021cbf1b (patch)
tree72e11683e2cacbee0977d4b7265cf0f973974f71 /eth
parent6999f1da6b0f8c93b40aa90250e55166018a11a5 (diff)
downloadgo-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar.gz
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar.bz2
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar.lz
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar.xz
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.tar.zst
go-tangerine-dc2b23c869a38cf5dce72479593c5ad6021cbf1b.zip
[release/1.4.13] core/state: track all accounts in canon state
This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes. (cherry picked from commit a59a93f476434f2805c8fd3e10bf1b2f579b078f)
Diffstat (limited to 'eth')
-rw-r--r--eth/api.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/api.go b/eth/api.go
index a2be81428..3df86756b 100644
--- a/eth/api.go
+++ b/eth/api.go
@@ -1575,14 +1575,14 @@ func NewPublicDebugAPI(eth *Ethereum) *PublicDebugAPI {
}
// DumpBlock retrieves the entire state of the database at a given block.
-func (api *PublicDebugAPI) DumpBlock(number uint64) (state.World, error) {
+func (api *PublicDebugAPI) DumpBlock(number uint64) (state.Dump, error) {
block := api.eth.BlockChain().GetBlockByNumber(number)
if block == nil {
- return state.World{}, fmt.Errorf("block #%d not found", number)
+ return state.Dump{}, fmt.Errorf("block #%d not found", number)
}
stateDb, err := state.New(block.Root(), api.eth.ChainDb())
if err != nil {
- return state.World{}, err
+ return state.Dump{}, err
}
return stateDb.RawDump(), nil
}