Skip to content

Commit f61766b

Browse files
committed
Make sure conflicted wallet tx's update balances
1 parent 605c178 commit f61766b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
811811
}
812812
iter++;
813813
}
814+
// If a transaction changes 'conflicted' state, that changes the balance
815+
// available of the outputs it spends. So force those to be recomputed
816+
BOOST_FOREACH(const CTxIn& txin, wtx.vin)
817+
{
818+
if (mapWallet.count(txin.prevout.hash))
819+
mapWallet[txin.prevout.hash].MarkDirty();
820+
}
814821
}
815822
}
816823
}

0 commit comments

Comments
 (0)