diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-12-21 11:02:41 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-12-26 12:33:23 -0500 |
commit | ac617cc141fe05bea0dc5e8f9df3da43c0945842 (patch) | |
tree | 64e9f09a0ecdcf40cc9caaaa08b76ab2a7285193 /test | |
parent | 887796a5ffcbafcd281b920f8d55fcb6e8347584 (diff) | |
download | bitcoin-ac617cc141fe05bea0dc5e8f9df3da43c0945842.tar.xz |
wallettool: Check that the dumpfile checksum is the correct size
After parsing the checksum, make sure that it is the size that we expect
it to be.
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/tool_wallet.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index afe4dba7b4..2cb9dc4523 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -390,7 +390,11 @@ class ToolWalletTest(BitcoinTestFramework): bad_sum_wallet_dump = os.path.join(self.nodes[0].datadir, "wallet-bad_sum3.dump") dump_data["checksum"] = "2" * 10 self.write_dump(dump_data, bad_sum_wallet_dump) - self.assert_raises_tool_error('Error: Dumpfile checksum does not match. Computed {}, expected {}{}'.format(checksum, "2" * 10, "0" * 54), '-wallet=badload', '-dumpfile={}'.format(bad_sum_wallet_dump), 'createfromdump') + self.assert_raises_tool_error('Error: Checksum is not the correct size', '-wallet=badload', '-dumpfile={}'.format(bad_sum_wallet_dump), 'createfromdump') + assert not os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest/wallets", "badload")) + dump_data["checksum"] = "3" * 66 + self.write_dump(dump_data, bad_sum_wallet_dump) + self.assert_raises_tool_error('Error: Checksum is not the correct size', '-wallet=badload', '-dumpfile={}'.format(bad_sum_wallet_dump), 'createfromdump') assert not os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest/wallets", "badload")) |