diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-03-07 05:57:54 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-03-07 06:06:16 -0500 |
commit | db27ac935480aeec40a1cfc9d5f10a48be55d61b (patch) | |
tree | 6b5c0be1e376e64dc7171ddd1ac9f6e1256a2deb /test | |
parent | 3b08427b58007351cc94ab099123af13ef590e56 (diff) |
tests: Ensure sorted/multi_a descriptors always generate different addrs
Sometimes the multi_a and sortedmulti_a descriptors will produce some of
the same addresses in the tests. This causes the wallets to start
generating addresses at a different index as they detect that one of
the addresses is used. This subsequently causes a test failure.
To avoid this problem, use descriptors that will produce unique
addresses by putting one of the multi_a in a different branch.
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet_taproot.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/wallet_taproot.py b/test/functional/wallet_taproot.py index 54c9928522..f72e2026a3 100755 --- a/test/functional/wallet_taproot.py +++ b/test/functional/wallet_taproot.py @@ -429,10 +429,10 @@ class WalletTaprootTest(BitcoinTestFramework): lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2], True)]) ) self.do_test( - "tr(H,multi_a(1,XPUB,XPRV))", - "tr($H,multi_a(1,$1/*,$2/*))", + "tr(H,{H,multi_a(1,XPUB,XPRV)})", + "tr($H,{pk($H),multi_a(1,$1/*,$2/*)})", [False, True], - lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2])]) + lambda k1, k2: (key(H_POINT), [pk(H_POINT), [multi_a(1, [k1, k2])]]) ) self.do_test( "tr(H,sortedmulti_a(1,XPUB,XPRV,XPRV))", |