eth: make traceChain avoid OOM on long-running tracing (#23736)
This PR changes long-running chain tracing, so that it at some points releases the memory trie db, and switch over to a fresh disk-backed trie.
This commit is contained in:
committed by
GitHub
parent
53b94f135a
commit
3bbeb94c1c
@ -138,7 +138,7 @@ func (b *testBackend) ChainDb() ethdb.Database {
|
||||
return b.chaindb
|
||||
}
|
||||
|
||||
func (b *testBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, checkLive bool) (*state.StateDB, error) {
|
||||
func (b *testBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, checkLive bool, preferDisk bool) (*state.StateDB, error) {
|
||||
statedb, err := b.chain.StateAt(block.Root())
|
||||
if err != nil {
|
||||
return nil, errStateNotFound
|
||||
|
Reference in New Issue
Block a user