diff options
author | Martin Holst Swende <martin@swende.se> | 2019-03-26 22:48:31 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2019-03-26 22:48:31 +0800 |
commit | 59e195324643e8f3a18396b529e3350e550fdecc (patch) | |
tree | 80850abf25e40b1e3a5bd359dacc654b651d8c73 /core/rawdb/table.go | |
parent | df717abc999add34c5725ab86dce1fcee968ca10 (diff) | |
download | go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar.gz go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar.bz2 go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar.lz go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar.xz go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.tar.zst go-tangerine-59e195324643e8f3a18396b529e3350e550fdecc.zip |
core, ethdb, trie: mode dirty data to clean cache on flush (#19307)
This PR is a more advanced form of the dirty-to-clean cacher (#18995),
where we reuse previous database write batches as datasets to uncache,
saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.
Diffstat (limited to 'core/rawdb/table.go')
-rw-r--r-- | core/rawdb/table.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/rawdb/table.go b/core/rawdb/table.go index 974df681b..e19649dd4 100644 --- a/core/rawdb/table.go +++ b/core/rawdb/table.go @@ -148,3 +148,8 @@ func (b *tableBatch) Write() error { func (b *tableBatch) Reset() { b.batch.Reset() } + +// Replay replays the batch contents. +func (b *tableBatch) Replay(w ethdb.Writer) error { + return b.batch.Replay(w) +} |