diff options
| author | Gavin Andresen <[email protected]> | 2014-02-12 13:43:07 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2014-02-14 11:08:40 -0500 |
| commit | 2b72d46f4232b58835d44aa3abd711df399d4728 (patch) | |
| tree | 10a3b83f99ded1db30aa01cefd090dca5e3f6124 /src/sync.cpp | |
| parent | Make qa/rpc-tests/ compatible with OSX (diff) | |
| download | discoin-2b72d46f4232b58835d44aa3abd711df399d4728.tar.xz discoin-2b72d46f4232b58835d44aa3abd711df399d4728.zip | |
Handle "conflicted" transactions properly
Extend CMerkleTx::GetDepthInMainChain with the concept of
a "conflicted" transaction-- a transaction generated by the wallet
that is not in the main chain or in the mempool, and, therefore,
will likely never be confirmed.
GetDepthInMainChain() now returns -1 for conflicted transactions
(0 for unconfirmed-but-in-the-mempool, and >1 for confirmed).
This makes getbalance, getbalance '*', and listunspent all agree when there are
mutated transactions in the wallet.
Before:
listunspent: one 49BTC output
getbalance: 96 BTC (change counted twice)
getbalance '*': 46 BTC (spends counted twice)
After: all agree, 49 BTC available to spend.
Diffstat (limited to 'src/sync.cpp')
0 files changed, 0 insertions, 0 deletions