aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/listtransactions.py
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2015-06-11 00:57:50 -0700
committerMatt Corallo <git@bluematt.me>2015-07-20 16:01:37 -0700
commit907a425aa5b8fd90cf1d28215712a309e934b364 (patch)
treef58579e333f979eaf3e44f710228260fde9f8439 /qa/rpc-tests/listtransactions.py
parent983d2d90af1b517bee51170d2ea059e68d09be35 (diff)
Add p2sh option to importaddress to import redeemScripts
Diffstat (limited to 'qa/rpc-tests/listtransactions.py')
-rwxr-xr-xqa/rpc-tests/listtransactions.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index eeae2d2fa2..b30a6bc9d1 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -93,6 +93,16 @@ class ListTransactionsTest(BitcoinTestFramework):
{"category":"receive","amount":Decimal("0.44")},
{"txid":txid, "account" : "toself"} )
+ multisig = self.nodes[1].createmultisig(1, [self.nodes[1].getnewaddress()])
+ self.nodes[0].importaddress(multisig["redeemScript"], "watchonly", False, True)
+ txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
+ self.nodes[1].generate(1)
+ self.sync_all()
+ assert(len(self.nodes[0].listtransactions("watchonly", 100, 0, False)) == 0)
+ check_array_result(self.nodes[0].listtransactions("watchonly", 100, 0, True),
+ {"category":"receive","amount":Decimal("0.1")},
+ {"txid":txid, "account" : "watchonly"} )
+
if __name__ == '__main__':
ListTransactionsTest().main()