From bb7c786b093b1277f59b2611a32bee2591b1a9ab Mon Sep 17 00:00:00 2001 From: HackyMiner Date: Mon, 4 Feb 2019 20:42:46 +0900 Subject: trie: add missing unlock call in error case (#18985) --- trie/database.go | 1 + 1 file changed, 1 insertion(+) 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() -- cgit v1.2.3