Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_listtransactions.py
Show All 11 Lines | |||||
class ListTransactionsTest(BitcoinTestFramework): | class ListTransactionsTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.enable_mocktime() | self.enable_mocktime() | ||||
def run_test(self): | def run_test(self): | ||||
# Leave IBD | |||||
self.nodes[0].generate(1) | |||||
# Simple send, 0 to 1: | # Simple send, 0 to 1: | ||||
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1) | txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1) | ||||
self.sync_all() | self.sync_all() | ||||
assert_array_result(self.nodes[0].listtransactions(), | assert_array_result(self.nodes[0].listtransactions(), | ||||
{"txid": txid}, | {"txid": txid}, | ||||
{"category": "send", "account": "", "amount": Decimal("-0.1"), "confirmations": 0}) | {"category": "send", "account": "", "amount": Decimal("-0.1"), "confirmations": 0}) | ||||
assert_array_result(self.nodes[1].listtransactions(), | assert_array_result(self.nodes[1].listtransactions(), | ||||
{"txid": txid}, | {"txid": txid}, | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |