From 33fdd030b118bfb3a0cbbce40aabcd741c0040c9 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 25 May 2023 09:31:05 +0200 Subject: [PATCH] ethdb/pebble: fix NewBatchWithSize to set db (#27350) --- ethdb/pebble/pebble.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethdb/pebble/pebble.go b/ethdb/pebble/pebble.go index e538084777..b43529eddb 100644 --- a/ethdb/pebble/pebble.go +++ b/ethdb/pebble/pebble.go @@ -307,7 +307,8 @@ func (d *Database) NewBatch() ethdb.Batch { // batch object without any pre-allocated space. func (d *Database) NewBatchWithSize(_ int) ethdb.Batch { return &batch{ - b: d.db.NewBatch(), + b: d.db.NewBatch(), + db: d, } }