diff options
author | Alex Morcos <morcos@chaincode.com> | 2016-03-17 12:48:05 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2016-03-18 09:56:30 -0400 |
commit | 68d4282774d6a60c609301cddad0b652f16df4d9 (patch) | |
tree | 52c259063edbf9d2b0666ff053962a4931599268 /qa | |
parent | f034bced269c4859809d320dcfbdc4b008191b85 (diff) |
Fix calculation of balances and available coins.
No longer consider coins which aren't in our mempool.
Add test for regression in abandonconflict.py
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/rpc-tests/abandonconflict.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qa/rpc-tests/abandonconflict.py b/qa/rpc-tests/abandonconflict.py index 38028df079..a83aa97fcd 100755 --- a/qa/rpc-tests/abandonconflict.py +++ b/qa/rpc-tests/abandonconflict.py @@ -83,6 +83,12 @@ class AbandonConflictTest(BitcoinTestFramework): # inputs are still spent, but change not received newbalance = self.nodes[0].getbalance() assert(newbalance == balance - Decimal("24.9996")) + # Unconfirmed received funds that are not in mempool, also shouldn't show + # up in unconfirmed balance + unconfbalance = self.nodes[0].getunconfirmedbalance() + self.nodes[0].getbalance() + assert(unconfbalance == newbalance) + # Also shouldn't show up in listunspent + assert(not txABC2 in [utxo["txid"] for utxo in self.nodes[0].listunspent(0)]) balance = newbalance # Abandon original transaction and verify inputs are available again |