Skip to content

Commit

Permalink
test/descriptor: Add empty leaf version input to rawleaf test
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunovo committed Jul 4, 2024
1 parent 7efb115 commit abe2860
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/descriptor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ BOOST_AUTO_TEST_CASE(descriptor_test)
CheckUnparsable("tr(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,rawleaf(z,c0))", "tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,rawleaf(z,c0))", "Leaf Script is not hex");
CheckUnparsable("tr(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,rawleaf(a0,ca00))", "tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,rawleaf(a0,ca00))", "Leaf Version is too large");
CheckUnparsable("tr(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,rawleaf(a0,z0))", "tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,rawleaf(a0,z0))", "Leaf Version is not hex");
CheckUnparsable("tr(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,rawleaf(a0,))", "tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,rawleaf(a0,))", "Expected Leaf Version but not provided");

// Basic sh(pkh()) with key origin
CheckInferDescriptor("a9141a31ad23bf49c247dd531a623c2ef57da3c400c587", "sh(pkh([deadbeef/0h/0h/0]03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))", {"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac"}, {{"03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd", "deadbeef/0h/0h/0"}});
Expand Down

0 comments on commit abe2860

Please sign in to comment.