Browse Source

Merge pull request #7306

f61766b Make sure conflicted wallet tx's update balances (Alex Morcos)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
9de541a9c9
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 7
      src/wallet/wallet.cpp

7
src/wallet/wallet.cpp

@ -811,6 +811,13 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx) @@ -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();
}
}
}
}

Loading…
Cancel
Save