aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-03-07 05:57:54 -0500
committerAndrew Chow <achow101-github@achow101.com>2022-03-07 06:06:16 -0500
commitdb27ac935480aeec40a1cfc9d5f10a48be55d61b (patch)
tree6b5c0be1e376e64dc7171ddd1ac9f6e1256a2deb /test
parent3b08427b58007351cc94ab099123af13ef590e56 (diff)
downloadbitcoin-db27ac935480aeec40a1cfc9d5f10a48be55d61b.tar.xz
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-xtest/functional/wallet_taproot.py6
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))",