Skip to content

Commit bd22e66

Browse files
committed
descriptor: add script/address cases for rawtr()
1 parent d9f3412 commit bd22e66

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/ctest/test_descriptor.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,18 @@ static const struct descriptor_test {
371371
WALLY_NETWORK_NONE, 0, 0, 0, NULL, 0,
372372
"76a91477b6f27ac523d8b9aa8abcfc94fd536493202ae088ac",
373373
"9gv5p2gj"
374+
},{
375+
"descriptor - rawtr - x-only",
376+
"rawtr(x_only)",
377+
WALLY_NETWORK_BITCOIN_REGTEST, 0, 0, 0, NULL, 0,
378+
"5120b71aa79cab0ae2d83b82d44cbdc23f5dcca3797e8ba622c4e45a8f7dce28ba0e",
379+
"nsnjmrf4"
380+
},{
381+
"descriptor - rawtr - non-x-only returns the same script as x-only",
382+
"rawtr(non_x_only)",
383+
WALLY_NETWORK_BITCOIN_REGTEST, 0, 0, 0, NULL, 0,
384+
"5120b71aa79cab0ae2d83b82d44cbdc23f5dcca3797e8ba622c4e45a8f7dce28ba0e",
385+
"ha989syu"
374386
},{
375387
"descriptor - A single key",
376388
"wsh(c:pk_k(key_1))",
@@ -1759,6 +1771,29 @@ static const struct address_test {
17591771
1, 0, 0,
17601772
ADDR("mn9rm3FtHUHANae2p5jURy9GXJGDM1ox43")
17611773
},
1774+
/*
1775+
* Taproot
1776+
*/
1777+
{
1778+
"address - rawtr (x-only)",
1779+
"rawtr(x_only)",
1780+
WALLY_NETWORK_BITCOIN_REGTEST,
1781+
0, 0, 0,
1782+
ADDR("bcrt1pkud2089tpt3dswuz63xtms3lthx2x7t73wnz938yt28hmn3ghg8qvxhwkz")
1783+
},
1784+
{
1785+
"address list - rawtr (0-4)",
1786+
"rawtr([59d1f3b0/86'/1'/0']tpubDC2Q4xK4XH72Gow34bNSZpx7uPcg1gfu6hPACSSieETYzpWgywMLmi2Yz9STA2Nrif3Yav7jvkzSj8q3nDKjjQrEfRYckUj5jsadYCdCw1C/0/*)#2k4we0vv",
1787+
WALLY_NETWORK_BITCOIN_REGTEST,
1788+
0, 0, 0, 5,
1789+
{
1790+
"bcrt1p7evqsttltmzxd4sjyzhdzs5nj8tmahu0qdpge8t7gp3dsr3hx3dq403ahy",
1791+
"bcrt1pa76letfw4eskpz9wap84ha0vcajul7xhhnhktmpp0mhgzlcdr6gswjcq3u",
1792+
"bcrt1phmq09p8y6efk06fp5hvf6dkvjsq2vfmph2uuy7y6ya6jvmrfxq3s44cksv",
1793+
"bcrt1p9s6clznyy4enaplm2ak9fa0t3d66s5q5m4khpg7w00w9wuerp93q88e9ql",
1794+
"bcrt1p220y7newnya8fk04079hcvd3cupx6t8ta659nayh8kaav39f3scsf63y8h",
1795+
}
1796+
},
17621797
/*
17631798
* Multi-path
17641799
*/

0 commit comments

Comments
 (0)