diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2014-02-13 20:12:51 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2014-02-14 18:13:42 -0500 |
commit | 731b89b8b53cb2ea4d2d5c8f2875def515766ea1 (patch) | |
tree | 161b262a14cf8396ca47f9b3ddbc0790465c3760 /qa/rpc-tests/txnmall.sh | |
parent | 9a3d936fc2e98b1e8234bf27e09cf7bc22811bee (diff) |
Track and report wallet transaction clones
Adds a "walletconflicts" array to transaction info; if
a wallet transaction is mutated, the alternate transaction id
or ids are reported there (usually the array will be empty).
Metadata from the original transaction is copied to the mutant,
so the transaction time and "from" account of the mutant are
reported correctly.
Diffstat (limited to 'qa/rpc-tests/txnmall.sh')
-rwxr-xr-x | qa/rpc-tests/txnmall.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qa/rpc-tests/txnmall.sh b/qa/rpc-tests/txnmall.sh index 7aca5f36df..6bf92fce40 100755 --- a/qa/rpc-tests/txnmall.sh +++ b/qa/rpc-tests/txnmall.sh @@ -88,8 +88,10 @@ B2ADDRESS=$( $CLI $B2ARGS getnewaddress ) # Have B1 create two transactions; second will # spend change from first, since B1 starts with only a single # 50 bitcoin output: -TXID1=$( $CLI $B1ARGS sendtoaddress $B2ADDRESS 1.0 ) -TXID2=$( $CLI $B1ARGS sendtoaddress $B2ADDRESS 2.0 ) +$CLI $B1ARGS move "" "foo" 10.0 +$CLI $B1ARGS move "" "bar" 10.0 +TXID1=$( $CLI $B1ARGS sendfrom foo $B2ADDRESS 1.0 0) +TXID2=$( $CLI $B1ARGS sendfrom bar $B2ADDRESS 2.0 0) # Mutate TXID1 and add it to B2's memory pool: RAWTX1=$( $CLI $B1ARGS getrawtransaction $TXID1 ) @@ -122,7 +124,9 @@ echo "Mutated: " $MUTATEDTXID $CLI $B2ARGS addnode 127.0.0.1:11000 onetry WaitPeers "$B1ARGS" 1 -$CLI $B2ARGS setgenerate true 1 +$CLI $B2ARGS setgenerate true 3 +WaitBlocks +$CLI $B1ARGS setgenerate true 3 WaitBlocks $CLI $B2ARGS stop > /dev/null 2>&1 |