Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_listtransactions.py
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
{"txid": txid, "account": "from1"}) | {"txid": txid, "account": "from1"}) | ||||
assert_array_result(self.nodes[1].listtransactions(), | assert_array_result(self.nodes[1].listtransactions(), | ||||
{"category": "send", "amount": Decimal("-0.44")}, | {"category": "send", "amount": Decimal("-0.44")}, | ||||
{"txid": txid, "account": ""}) | {"txid": txid, "account": ""}) | ||||
assert_array_result(self.nodes[1].listtransactions(), | assert_array_result(self.nodes[1].listtransactions(), | ||||
{"category": "receive", "amount": Decimal("0.44")}, | {"category": "receive", "amount": Decimal("0.44")}, | ||||
{"txid": txid, "account": "toself"}) | {"txid": txid, "account": "toself"}) | ||||
pubkey = self.nodes[1].validateaddress( | 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( | ||||
Show All 9 Lines |