diff --git a/trie/database.go b/trie/database.go index 739a98addb..aba5943f5a 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()