Skip to content

Commit db27ac9

Browse files
committed
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.
1 parent 3b08427 commit db27ac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/wallet_taproot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ def run_test(self):
429429
lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2], True)])
430430
)
431431
self.do_test(
432-
"tr(H,multi_a(1,XPUB,XPRV))",
433-
"tr($H,multi_a(1,$1/*,$2/*))",
432+
"tr(H,{H,multi_a(1,XPUB,XPRV)})",
433+
"tr($H,{pk($H),multi_a(1,$1/*,$2/*)})",
434434
[False, True],
435-
lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2])])
435+
lambda k1, k2: (key(H_POINT), [pk(H_POINT), [multi_a(1, [k1, k2])]])
436436
)
437437
self.do_test(
438438
"tr(H,sortedmulti_a(1,XPUB,XPRV,XPRV))",

0 commit comments

Comments
 (0)