aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/database.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethdb/database.go')
-rw-r--r--ethdb/database.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/ethdb/database.go b/ethdb/database.go
index f4a5ce2c8..e32c912f9 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -388,6 +388,12 @@ func (b *ldbBatch) Put(key, value []byte) error {
return nil
}
+func (b *ldbBatch) Delete(key []byte) error {
+ b.b.Delete(key)
+ b.size += 1
+ return nil
+}
+
func (b *ldbBatch) Write() error {
return b.db.Write(b.b, nil)
}
@@ -453,6 +459,10 @@ func (tb *tableBatch) Put(key, value []byte) error {
return tb.batch.Put(append([]byte(tb.prefix), key...), value)
}
+func (tb *tableBatch) Delete(key []byte) error {
+ return tb.batch.Delete(append([]byte(tb.prefix), key...))
+}
+
func (tb *tableBatch) Write() error {
return tb.batch.Write()
}