trie/database: add a missing unlock

This commit is contained in:
hackyminer 2019-02-04 05:47:45 +09:00
parent 98e0bedcd7
commit 5d9dd742ab
No known key found for this signature in database
GPG key ID: 46D453DDCA4B766F

View file

@ -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()