Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_dump.py
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# all scripts must be in the dump | # all scripts must be in the dump | ||||
assert_equal(found_script_addr, 1) | assert_equal(found_script_addr, 1) | ||||
# 0 blocks where mined | # 0 blocks where mined | ||||
assert_equal(found_addr_chg, 0) | assert_equal(found_addr_chg, 0) | ||||
# 90 keys plus 100% internal keys | # 90 keys plus 100% internal keys | ||||
assert_equal(found_addr_rsv, 90 * 2) | assert_equal(found_addr_rsv, 90 * 2) | ||||
# encrypt wallet, restart, unlock and dump | # encrypt wallet, restart, unlock and dump | ||||
self.nodes[0].node_encrypt_wallet('test') | self.nodes[0].encryptwallet('test') | ||||
self.start_node(0) | |||||
self.nodes[0].walletpassphrase('test', 10) | self.nodes[0].walletpassphrase('test', 10) | ||||
# Should be a no-op: | # Should be a no-op: | ||||
self.nodes[0].keypoolrefill() | self.nodes[0].keypoolrefill() | ||||
self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.encrypted.dump") | self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.encrypted.dump") | ||||
found_addr, found_script_addr, found_addr_chg, found_addr_rsv, _ = \ | found_addr, found_script_addr, found_addr_chg, found_addr_rsv, _ = \ | ||||
read_dump(tmpdir + "/node0/wallet.encrypted.dump", | read_dump(tmpdir + "/node0/wallet.encrypted.dump", | ||||
addrs, [multisig_addr], hd_master_addr_unenc) | addrs, [multisig_addr], hd_master_addr_unenc) | ||||
Show All 28 Lines |