Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_listtransactions.py
Show All 15 Lines | def txFromHex(hexstring): | ||||
f = BytesIO(hex_str_to_bytes(hexstring)) | f = BytesIO(hex_str_to_bytes(hexstring)) | ||||
tx.deserialize(f) | tx.deserialize(f) | ||||
return tx | return tx | ||||
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() | |||||
def run_test(self): | def run_test(self): | ||||
# 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}) | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |