Changeset View
Changeset View
Standalone View
Standalone View
test/functional/fundrawtransaction.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 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. | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework, BITCOIND_PROC_WAIT_TIMEOUT | ||||
from test_framework.util import * | from test_framework.util import * | ||||
def get_unspent(listunspent, amount): | def get_unspent(listunspent, amount): | ||||
for utx in listunspent: | for utx in listunspent: | ||||
if utx['amount'] == amount: | if utx['amount'] == amount: | ||||
return utx | return utx | ||||
raise AssertionError( | raise AssertionError( | ||||
▲ Show 20 Lines • Show All 443 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
oldBalance + Decimal('1.10000000'), self.nodes[1].getbalance()) | oldBalance + Decimal('1.10000000'), self.nodes[1].getbalance()) | ||||
# | # | ||||
# locked wallet test | # locked wallet test | ||||
self.stop_node(0) | self.stop_node(0) | ||||
self.stop_node(2) | self.stop_node(2) | ||||
self.stop_node(3) | self.stop_node(3) | ||||
self.nodes[1].encryptwallet("test") | self.nodes[1].encryptwallet("test") | ||||
self.nodes.pop(1) | self.bitcoind_processes[1].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT) | ||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir) | self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir) | ||||
# This test is not meant to test fee estimation and we'd like | # This test is not meant to test fee estimation and we'd like | ||||
# to be sure all txs are sent at a consistent desired feerate | # to be sure all txs are sent at a consistent desired feerate | ||||
for node in self.nodes: | for node in self.nodes: | ||||
node.settxfee(min_relay_tx_fee) | node.settxfee(min_relay_tx_fee) | ||||
connect_nodes_bi(self.nodes, 0, 1) | connect_nodes_bi(self.nodes, 0, 1) | ||||
▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines |