Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_dump.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2016 The Bitcoin Core developers | # Copyright (c) 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. | ||||
"""Test the dumpwallet RPC.""" | """Test the dumpwallet RPC.""" | ||||
import os | import os | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import (assert_equal, assert_raises_rpc_error) | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
def read_dump(file_name, addrs, script_addrs, hd_master_addr_old): | def read_dump(file_name, addrs, script_addrs, hd_master_addr_old): | ||||
""" | """ | ||||
Read the given dump, count the addrs that match, count change and reserve. | Read the given dump, count the addrs that match, count change and reserve. | ||||
Also check that the old hd_master is inactive | Also check that the old hd_master is inactive | ||||
""" | """ | ||||
with open(file_name, encoding='utf8') as inputfile: | with open(file_name, encoding='utf8') as inputfile: | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |