Skip to content

Commit

Permalink
test: add P2A ProduceSignature coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Jul 30, 2024
1 parent 7998ce6 commit 75648ce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/script_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,19 @@ BOOST_AUTO_TEST_CASE(sign_invalid_miniscript)
BOOST_CHECK(!SignSignature(keystore, CTransaction(prev), curr, 0, SIGHASH_ALL, sig_data));
}

/* P2A input should be considered signed. */
BOOST_AUTO_TEST_CASE(sign_paytoanchor)
{
FillableSigningProvider keystore;
SignatureData sig_data;
CMutableTransaction prev, curr;
prev.vout.emplace_back(0, GetScriptForDestination(PayToAnchor{}));

curr.vin.emplace_back(COutPoint{prev.GetHash(), 0});

BOOST_CHECK(SignSignature(keystore, CTransaction(prev), curr, 0, SIGHASH_ALL, sig_data));
}

BOOST_AUTO_TEST_CASE(script_standard_push)
{
ScriptError err;
Expand Down

0 comments on commit 75648ce

Please sign in to comment.