From 97f16618536944bb644680b2c8252b57151bc89c Mon Sep 17 00:00:00 2001 From: pasta Date: Fri, 27 Mar 2020 20:47:35 -0500 Subject: [PATCH] fix test failure and fix indentation Signed-off-by: pasta --- test/functional/wallet-dump.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/functional/wallet-dump.py b/test/functional/wallet-dump.py index 15d3b23a7a..9ceb10026e 100755 --- a/test/functional/wallet-dump.py +++ b/test/functional/wallet-dump.py @@ -99,10 +99,9 @@ class WalletDumpTest(BitcoinTestFramework): # Should be a no-op: self.nodes[0].keypoolrefill() - # Test scripts dump by adding a P2SH witness and a 1-of-1 multisig address - witness_addr = self.nodes[0].addwitnessaddress(addrs[0]["address"], True) + # Test scripts dump by adding a 1-of-1 multisig address multisig_addr = self.nodes[0].addmultisigaddress(1, [addrs[1]["address"]]) - script_addrs = [witness_addr, multisig_addr] + script_addrs = [multisig_addr] # dump unencrypted wallet self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.unencrypted.dump") @@ -110,7 +109,8 @@ class WalletDumpTest(BitcoinTestFramework): found_addr, found_script_addr, found_addr_chg, found_addr_rsv, hd_master_addr_unenc = \ read_dump(tmpdir + "/node0/wallet.unencrypted.dump", addrs, script_addrs, None) assert_equal(found_addr, test_addr_count) # all keys must be in the dump - assert_equal(found_script_addr, 2) # all scripts must be in the dump + # This is 1, not 2 because we aren't testing for witness scripts + assert_equal(found_script_addr, 1) # all scripts must be in the dump assert_equal(found_addr_chg, 50) # 50 blocks where mined assert_equal(found_addr_rsv, 180) # keypool size (external+internal) @@ -125,8 +125,9 @@ class WalletDumpTest(BitcoinTestFramework): found_addr, found_script_addr, found_addr_chg, found_addr_rsv, _ = \ read_dump(tmpdir + "/node0/wallet.encrypted.dump", addrs, script_addrs, hd_master_addr_unenc) assert_equal(found_addr, test_addr_count) - assert_equal(found_script_addr, 2) - # TODO clarify if we want the behavior that is tested below in Dash (only when HD seed was generated and not user-provided) + # This is 1, not 2 because we aren't testing for witness scripts + assert_equal(found_script_addr, 1) + # TODO clarify if we want the behavior that is tested below in Dash (only when HD seed was generated and not user-provided) # assert_equal(found_addr_chg, 180 + 50) # old reserve keys are marked as change now assert_equal(found_addr_rsv, 180) # keypool size