diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-11-13 00:47:34 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-11-15 18:22:13 +0800 |
commit | 434dd5bc0067cdf604d84426df9086015721dd36 (patch) | |
tree | 279d85e32a36b8804d60c5a4b83b444514850782 /eth/api_tracer.go | |
parent | 9a000601c6c4e4f8134caedba1957ffe28d2b659 (diff) | |
download | dexon-434dd5bc0067cdf604d84426df9086015721dd36.tar.gz dexon-434dd5bc0067cdf604d84426df9086015721dd36.tar.zst dexon-434dd5bc0067cdf604d84426df9086015721dd36.zip |
cmd, core, eth, light, trie: add trie read caching layer
Diffstat (limited to 'eth/api_tracer.go')
-rw-r--r-- | eth/api_tracer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 80552ada8..2ebbcc5fd 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -138,7 +138,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl // Ensure we have a valid starting state before doing any work origin := start.NumberU64() - database := state.NewDatabase(api.eth.ChainDb()) + database := state.NewDatabaseWithCache(api.eth.ChainDb(), 16) // Chain tracing will probably start at genesis if number := start.NumberU64(); number > 0 { start = api.eth.blockchain.GetBlock(start.ParentHash(), start.NumberU64()-1) @@ -492,7 +492,7 @@ func (api *PrivateDebugAPI) computeStateDB(block *types.Block, reexec uint64) (* } // Otherwise try to reexec blocks until we find a state or reach our limit origin := block.NumberU64() - database := state.NewDatabase(api.eth.ChainDb()) + database := state.NewDatabaseWithCache(api.eth.ChainDb(), 16) for i := uint64(0); i < reexec; i++ { block = api.eth.blockchain.GetBlock(block.ParentHash(), block.NumberU64()-1) |