mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
test: add P2A ProduceSignature coverage
This commit is contained in:
parent
7998ce6b20
commit
75648cea5a
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue