Skip to content

Commit

Permalink
Make sure conflicted wallet tx's update balances
Browse files Browse the repository at this point in the history
Github-Pull: #7306
Rebased-From: f61766b
  • Loading branch information
morcos authored and laanwj committed Jan 8, 2016
1 parent 9265e89 commit 4707797
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/wallet/wallet.cpp
Expand Up @@ -811,6 +811,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
}
iter++;
}
// If a transaction changes 'conflicted' state, that changes the balance
// available of the outputs it spends. So force those to be recomputed
BOOST_FOREACH(const CTxIn& txin, wtx.vin)
{
if (mapWallet.count(txin.prevout.hash))
mapWallet[txin.prevout.hash].MarkDirty();
}
}
}
}
Expand Down

0 comments on commit 4707797

Please sign in to comment.