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() {
if rerr == nil {
rerr = db.processBatches()
} else {
db.lBatch().Reset()
}
}()