core, ethdb, tests, trie: introduce database snapshot (#24486)

This commit is contained in:
rjl493456442
2022-03-10 16:35:22 +08:00
committed by GitHub
parent 5079e3c6e5
commit 8c8a9e5ca1
9 changed files with 223 additions and 2 deletions

View File

@@ -475,9 +475,13 @@ func (l *loggingDb) NewBatchWithSize(size int) ethdb.Batch {
}
func (l *loggingDb) NewIterator(prefix []byte, start []byte) ethdb.Iterator {
fmt.Printf("NewIterator\n")
return l.backend.NewIterator(prefix, start)
}
func (l *loggingDb) NewSnapshot() (ethdb.Snapshot, error) {
return l.backend.NewSnapshot()
}
func (l *loggingDb) Stat(property string) (string, error) {
return l.backend.Stat(property)
}