Reset batch on error

This commit is contained in:
David Hill 2013-11-26 16:42:55 -05:00
parent ca502abbf2
commit 01b6ad7196

View file

@ -259,7 +259,8 @@ func (db *LevelDb) DropAfterBlockBySha(sha *btcwire.ShaHash) (rerr error) {
defer func() { defer func() {
if rerr == nil { if rerr == nil {
rerr = db.processBatches() rerr = db.processBatches()
} else {
db.lBatch().Reset()
} }
}() }()