diff options
Diffstat (limited to 'ethdb/database.go')
-rw-r--r-- | ethdb/database.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ethdb/database.go b/ethdb/database.go index 93755dd7e..d86585f07 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -299,6 +299,11 @@ func (b *ldbBatch) ValueSize() int { return b.size } +func (b *ldbBatch) Reset() { + b.b.Reset() + b.size = 0 +} + type table struct { db Database prefix string @@ -358,3 +363,7 @@ func (tb *tableBatch) Write() error { func (tb *tableBatch) ValueSize() int { return tb.batch.ValueSize() } + +func (tb *tableBatch) Reset() { + tb.batch.Reset() +} |