Skip to content

Commit 733edf7

Browse files
authored
fix entryIsDeleted value for flushLockedBalanceEntriesToDbWithTxn (#1450)
1 parent 5980839 commit 733edf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/block_view_lockups.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2883,7 +2883,8 @@ func (bav *UtxoView) _flushLockedBalanceEntriesToDbWithTxn(txn *badger.Txn, bloc
28832883
// Delete the existing mappings in the db for this LockedBalanceEntry.
28842884
// They will be re-added if the corresponding entry in memory has isDeleted=false.
28852885
if err := DbDeleteLockedBalanceEntryWithTxn(txn, bav.Snapshot, *lockedBalanceEntry,
2886-
bav.EventManager, lockedBalanceEntry.isDeleted); err != nil {
2886+
bav.EventManager, lockedBalanceEntry.isDeleted || lockedBalanceEntry.BalanceBaseUnits.IsZero(),
2887+
); err != nil {
28872888
return errors.Wrapf(
28882889
err, "_flushLockedBalanceEntriesToDbWithTxn: Problem deleting mappings "+
28892890
"for LockedBalanceEntry: %v", &lockedBalanceEntryKey)

0 commit comments

Comments
 (0)