Merge bitcoin/bitcoin#24490: tests: Ensure sorted/multi_a descriptors always generate different addrs

db27ac9354 tests: Ensure sorted/multi_a descriptors always generate different addrs (Andrew Chow)

Pull request description:

  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.

ACKs for top commit:
  ajtowns:
    ACK db27ac9354
  theStack:
    Tested ACK db27ac9354

Tree-SHA512: 0f57822bf4c7c79da304f092d7d43d6118e78a087cbeb0766fbbf634dc27911ae723d5d41350884d3b63a24d3b3817944f7e5fa534afb849161dd008a1e4a62f
This commit is contained in:
MarcoFalke 2022-03-09 11:33:00 +01:00
commit aa83bbb1fe
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -416,10 +416,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))",