mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
trie: add missing unlock call in error case (#18985)
This commit is contained in:
@@ -679,6 +679,7 @@ func (db *Database) Commit(node common.Hash, report bool) error {
|
|||||||
}
|
}
|
||||||
if batch.ValueSize() > ethdb.IdealBatchSize {
|
if batch.ValueSize() > ethdb.IdealBatchSize {
|
||||||
if err := batch.Write(); err != nil {
|
if err := batch.Write(); err != nil {
|
||||||
|
db.lock.RUnlock()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
batch.Reset()
|
batch.Reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user