Gavin Andresen
2b72d46f42
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.
2014-02-14 11:08:40 -05:00
..
2014-01-29 14:41:41 +01:00
2014-01-30 10:14:00 +01:00
2014-01-13 14:45:23 +01:00
2014-01-27 15:30:51 -05:00
2014-01-27 08:36:14 +01:00
2013-11-14 19:58:00 +01:00
2014-01-06 10:34:33 +01:00
2013-11-10 09:36:28 -06:00
2013-11-10 09:36:28 -06:00
2013-11-14 19:58:00 +01:00
2014-02-07 12:27:41 +01:00
2014-01-13 14:45:23 +01:00
2014-01-29 14:15:55 +01:00
2014-01-29 14:15:55 +01:00
2014-01-29 14:41:41 +01:00
2013-11-04 16:27:09 +01:00
2014-01-22 15:28:50 +01:00
2014-01-22 15:28:50 +01:00
2014-01-13 17:36:24 +01:00
2013-11-04 16:27:09 +01:00
2013-11-10 09:36:28 -06:00
2013-12-20 11:18:50 +01:00
2013-12-20 11:18:50 +01:00
2013-12-20 15:50:21 +01:00
2013-11-18 08:16:12 +01:00
2013-11-18 08:16:12 +01:00
2013-11-18 08:16:12 +01:00
2013-11-04 16:27:09 +01:00
2013-11-10 09:36:28 -06:00
2013-12-17 07:56:40 +01:00
2013-11-14 19:58:00 +01:00
2014-01-13 14:45:23 +01:00
2014-01-29 14:15:55 +01:00
2014-01-29 14:15:55 +01:00
2014-01-10 11:43:29 +01:00
2013-11-10 09:36:28 -06:00
2013-11-10 09:36:28 -06:00
2013-12-17 07:56:40 +01:00
2013-11-10 09:36:28 -06:00
2013-12-17 07:56:40 +01:00
2014-01-29 15:05:42 +01:00
2013-11-10 09:36:28 -06:00
2013-11-04 16:27:09 +01:00
2014-01-10 16:30:33 -05:00
2013-12-03 14:01:53 +01:00
2013-12-04 13:18:09 +10:00
2013-11-14 19:58:00 +01:00
2014-01-17 15:43:44 +01:00
2014-01-06 16:19:04 +01:00
2014-02-07 12:27:41 +01:00
2014-02-07 12:27:41 +01:00
2013-11-10 09:36:28 -06:00
2013-11-10 09:36:28 -06:00
2013-08-22 16:18:25 +10:00
2013-11-10 09:36:28 -06:00
2013-11-10 09:36:28 -06:00
2014-01-17 15:43:44 +01:00
2014-01-13 17:11:05 +01:00
2014-01-29 14:15:55 +01:00
2014-01-29 14:15:55 +01:00
2013-11-04 16:27:09 +01:00
2013-11-04 16:27:09 +01:00
2014-01-29 14:20:15 +01:00
2014-01-29 14:20:15 +01:00
2013-11-19 14:07:38 +01:00
2013-11-04 16:27:09 +01:00
2014-01-29 14:20:15 +01:00
2014-01-28 10:48:41 +01:00
2014-01-22 15:28:50 +01:00
2014-01-22 15:28:50 +01:00
2014-01-29 14:41:41 +01:00
2013-11-24 16:30:14 +01:00
2014-01-29 14:15:55 +01:00
2013-11-24 16:30:14 +01:00
2014-01-29 14:15:55 +01:00
2013-11-14 19:58:00 +01:00
2014-01-22 09:46:15 +01:00
2014-01-11 10:20:28 +01:00
2013-11-04 16:27:09 +01:00
2013-11-04 16:27:09 +01:00
2014-02-14 11:08:40 -05:00
2013-11-10 09:36:28 -06:00
2013-11-04 16:27:09 +01:00
2013-11-04 16:27:09 +01:00
2013-11-10 09:36:28 -06:00
2013-11-10 09:36:28 -06:00
2014-02-12 16:23:06 -08:00
2013-11-10 09:36:28 -06:00
2014-01-06 16:30:19 +01:00
2013-11-10 09:36:28 -06:00
2013-11-14 19:58:00 +01:00
2013-11-10 09:36:28 -06:00
2014-01-29 17:20:26 +01:00
2014-01-18 16:57:02 +01:00
2013-11-13 09:22:00 +01:00
2013-11-13 09:22:00 +01:00
2014-02-14 11:08:40 -05:00
2014-01-22 09:46:15 +01:00
2013-11-10 09:36:28 -06:00
2013-12-17 07:56:40 +01:00
2013-12-03 14:01:53 +01:00
2013-12-03 14:01:53 +01:00