diff --git a/trie/database.go b/trie/database.go index 739a98add..aba5943f5 100644 --- a/trie/database.go +++ b/trie/database.go @@ -679,6 +679,7 @@ func (db *Database) Commit(node common.Hash, report bool) error { } if batch.ValueSize() > ethdb.IdealBatchSize { if err := batch.Write(); err != nil { + db.lock.RUnlock() return err } batch.Reset()