Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_listtransactions.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2019 The Bitcoin Core developers | # Copyright (c) 2014-2019 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test the listtransactions API.""" | """Test the listtransactions API.""" | ||||
from decimal import Decimal | from decimal import Decimal | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_array_result | from test_framework.util import assert_array_result | ||||
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.extra_args = [['-deprecatedrpc=accounts'], | |||||
['-deprecatedrpc=accounts']] | |||||
def run_test(self): | def run_test(self): | ||||
# Leave IBD | # Leave IBD | ||||
self.nodes[0].generate(1) | 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(), | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |