Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet-dump.py
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
read_dump(tmpdir + "/node0/wallet.unencrypted.dump", addrs, None) | read_dump(tmpdir + "/node0/wallet.unencrypted.dump", addrs, None) | ||||
assert_equal(found_addr, test_addr_count) | assert_equal(found_addr, test_addr_count) | ||||
# all keys must be in the dump | # all keys must be in the dump | ||||
assert_equal(found_addr_chg, 50) # 50 blocks where mined | assert_equal(found_addr_chg, 50) # 50 blocks where mined | ||||
# 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].encryptwallet('test') | self.nodes[0].node_encrypt_wallet('test') | ||||
self.bitcoind_processes[0].wait() | |||||
self.nodes[0] = self.start_node( | self.nodes[0] = self.start_node( | ||||
0, self.options.tmpdir, self.extra_args[0]) | 0, self.options.tmpdir, self.extra_args[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_addr_chg, found_addr_rsv, hd_master_addr_enc = \ | found_addr, found_addr_chg, found_addr_rsv, hd_master_addr_enc = \ | ||||
Show All 10 Lines |