mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-23 06:22:31 +00:00
Reset batch on error
This commit is contained in:
parent
ca502abbf2
commit
01b6ad7196
@ -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…
x
Reference in New Issue
Block a user