Reset batch on error
This commit is contained in:
parent
ca502abbf2
commit
01b6ad7196
1 changed files with 2 additions and 1 deletions
|
@ -259,7 +259,8 @@ func (db *LevelDb) DropAfterBlockBySha(sha *btcwire.ShaHash) (rerr error) {
|
|||
defer func() {
|
||||
if rerr == nil {
|
||||
rerr = db.processBatches()
|
||||
|
||||
} else {
|
||||
db.lBatch().Reset()
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue