diff options
Diffstat (limited to 'test/functional/wallet_avoidreuse.py')
-rwxr-xr-x | test/functional/wallet_avoidreuse.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index 58ad835d39..3c8064ea2d 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -6,18 +6,12 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( + assert_approx, assert_equal, assert_raises_rpc_error, - connect_nodes_bi, + connect_nodes, ) -# TODO: Copied from wallet_groups.py -- should perhaps move into util.py -def assert_approx(v, vexp, vspan=0.00001): - if v < vexp - vspan: - raise AssertionError("%s < [%s..%s]" % (str(v), str(vexp - vspan), str(vexp + vspan))) - if v > vexp + vspan: - raise AssertionError("%s > [%s..%s]" % (str(v), str(vexp - vspan), str(vexp + vspan))) - def reset_balance(node, discardaddr): '''Throw away all owned coins by the node so it gets a balance of 0.''' balance = node.getbalance(avoid_reuse=False) @@ -103,7 +97,7 @@ class AvoidReuseTest(BitcoinTestFramework): # Stop and restart node 1 self.stop_node(1) self.start_node(1) - connect_nodes_bi(self.nodes, 0, 1) + connect_nodes(self.nodes[0], 1) # Flags should still be node1.avoid_reuse=false, node2.avoid_reuse=true assert_equal(self.nodes[0].getwalletinfo()["avoid_reuse"], False) |