Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_listtransactions.py
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
pubkey = self.nodes[1].getaddressinfo( | pubkey = self.nodes[1].getaddressinfo( | ||||
self.nodes[1].getnewaddress())['pubkey'] | self.nodes[1].getnewaddress())['pubkey'] | ||||
multisig = self.nodes[1].createmultisig(1, [pubkey]) | multisig = self.nodes[1].createmultisig(1, [pubkey]) | ||||
self.nodes[0].importaddress( | self.nodes[0].importaddress( | ||||
multisig["redeemScript"], "watchonly", False, True) | multisig["redeemScript"], "watchonly", False, True) | ||||
txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1) | txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1) | ||||
self.nodes[1].generate(1) | self.nodes[1].generate(1) | ||||
self.sync_all() | self.sync_all() | ||||
assert( | assert len(self.nodes[0].listtransactions( | ||||
len(self.nodes[0].listtransactions("watchonly", 100, 0, False)) == 0) | "watchonly", 100, 0, False)) == 0 | ||||
assert_array_result( | assert_array_result( | ||||
self.nodes[0].listtransactions("watchonly", 100, 0, True), | self.nodes[0].listtransactions("watchonly", 100, 0, True), | ||||
{"category": "receive", "amount": Decimal("0.1")}, | {"category": "receive", "amount": Decimal("0.1")}, | ||||
{"txid": txid, "account": "watchonly"}) | {"txid": txid, "account": "watchonly"}) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
ListTransactionsTest().main() | ListTransactionsTest().main() |