aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 09:05:59 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 09:22:08 +0100
commit30c2d8c635c41149b7184ea8471121c53042444c (patch)
tree90541c9459dc7e0be79684e190ca9e614f1a7c51 /qa/rpc-tests
parent1b5118bfa0d94dbc0f3d7803c3e68626b0a694ee (diff)
parent9ac63d6d3056600c1b784da0e6b98f679fa98b6e (diff)
Merge pull request #7105
9ac63d6 Keep track of explicit wallet conflicts instead of using mempool (Pieter Wuille)
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-xqa/rpc-tests/txn_clone.py2
-rwxr-xr-xqa/rpc-tests/txn_doublespend.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/qa/rpc-tests/txn_clone.py b/qa/rpc-tests/txn_clone.py
index e8ced0e5bb..b1f603a192 100755
--- a/qa/rpc-tests/txn_clone.py
+++ b/qa/rpc-tests/txn_clone.py
@@ -136,7 +136,7 @@ class TxnMallTest(BitcoinTestFramework):
tx2 = self.nodes[0].gettransaction(txid2)
# Verify expected confirmations
- assert_equal(tx1["confirmations"], -1)
+ assert_equal(tx1["confirmations"], -2)
assert_equal(tx1_clone["confirmations"], 2)
assert_equal(tx2["confirmations"], 1)
diff --git a/qa/rpc-tests/txn_doublespend.py b/qa/rpc-tests/txn_doublespend.py
index 36081127b4..d4665b3d42 100755
--- a/qa/rpc-tests/txn_doublespend.py
+++ b/qa/rpc-tests/txn_doublespend.py
@@ -99,7 +99,7 @@ class TxnMallTest(BitcoinTestFramework):
# Now give doublespend and its parents to miner:
self.nodes[2].sendrawtransaction(fund_foo_tx["hex"])
self.nodes[2].sendrawtransaction(fund_bar_tx["hex"])
- self.nodes[2].sendrawtransaction(doublespend["hex"])
+ doublespend_txid = self.nodes[2].sendrawtransaction(doublespend["hex"])
# ... mine a block...
self.nodes[2].generate(1)
@@ -107,14 +107,15 @@ class TxnMallTest(BitcoinTestFramework):
connect_nodes(self.nodes[1], 2)
self.nodes[2].generate(1) # Mine another block to make sure we sync
sync_blocks(self.nodes)
+ assert_equal(self.nodes[0].gettransaction(doublespend_txid)["confirmations"], 2)
# Re-fetch transaction info:
tx1 = self.nodes[0].gettransaction(txid1)
tx2 = self.nodes[0].gettransaction(txid2)
-
+
# Both transactions should be conflicted
- assert_equal(tx1["confirmations"], -1)
- assert_equal(tx2["confirmations"], -1)
+ assert_equal(tx1["confirmations"], -2)
+ assert_equal(tx2["confirmations"], -2)
# Node0's total balance should be starting balance, plus 100BTC for
# two more matured blocks, minus 1240 for the double-spend, plus fees (which are