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
24.x
MarcoFalke 3 years ago
commit aa83bbb1fe
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -416,10 +416,10 @@ class WalletTaprootTest(BitcoinTestFramework):
lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2], True)]) lambda k1, k2: (key(H_POINT), [multi_a(1, [k1, k2], True)])
) )
self.do_test( self.do_test(
"tr(H,multi_a(1,XPUB,XPRV))", "tr(H,{H,multi_a(1,XPUB,XPRV)})",
"tr($H,multi_a(1,$1/*,$2/*))", "tr($H,{pk($H),multi_a(1,$1/*,$2/*)})",
[False, True], [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( self.do_test(
"tr(H,sortedmulti_a(1,XPUB,XPRV,XPRV))", "tr(H,sortedmulti_a(1,XPUB,XPRV,XPRV))",

Loading…
Cancel
Save