aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/memory_database.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethdb/memory_database.go')
-rw-r--r--ethdb/memory_database.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go
index 0dd93a279..8efd7bf84 100644
--- a/ethdb/memory_database.go
+++ b/ethdb/memory_database.go
@@ -123,3 +123,8 @@ func (b *memBatch) Write() error {
func (b *memBatch) ValueSize() int {
return b.size
}
+
+func (b *memBatch) Reset() {
+ b.writes = b.writes[:0]
+ b.size = 0
+}