aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHackyMiner <hackyminer@gmail.com>2019-02-04 19:42:46 +0800
committerFelix Lange <fjl@users.noreply.github.com>2019-02-04 19:42:46 +0800
commitbb7c786b093b1277f59b2611a32bee2591b1a9ab (patch)
tree8142f05f574bed74e97f03292f3e815271b7c12a
parent98e0bedcd71031b7edef3eb25b5faa29ac166b4a (diff)
downloadgo-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar.gz
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar.bz2
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar.lz
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar.xz
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.tar.zst
go-tangerine-bb7c786b093b1277f59b2611a32bee2591b1a9ab.zip
trie: add missing unlock call in error case (#18985)
-rw-r--r--trie/database.go1
1 files changed, 1 insertions, 0 deletions
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()