mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 22:41:25 +02:00
refactor: use SignOptions for MutableTransactionSignatureCreator
This commit is contained in:
@@ -1265,7 +1265,7 @@ SignatureData CombineSignatures(const CTxOut& txout, const CMutableTransaction&
|
||||
SignatureData data;
|
||||
data.MergeSignatureData(scriptSig1);
|
||||
data.MergeSignatureData(scriptSig2);
|
||||
ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(tx, 0, txout.nValue, SIGHASH_DEFAULT), txout.scriptPubKey, data);
|
||||
ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(tx, 0, txout.nValue, {.sighash_type = SIGHASH_DEFAULT}), txout.scriptPubKey, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1681,7 +1681,7 @@ BOOST_AUTO_TEST_CASE(bip341_keypath_test_vectors)
|
||||
// Sign and verify signature.
|
||||
FlatSigningProvider provider;
|
||||
provider.keys[key.GetPubKey().GetID()] = key;
|
||||
MutableTransactionSignatureCreator creator(tx, txinpos, utxos[txinpos].nValue, &txdata, hashtype);
|
||||
MutableTransactionSignatureCreator creator(tx, txinpos, utxos[txinpos].nValue, &txdata, {.sighash_type = hashtype});
|
||||
std::vector<unsigned char> signature;
|
||||
BOOST_CHECK(creator.CreateSchnorrSig(provider, signature, pubkey, nullptr, &merkle_root, SigVersion::TAPROOT));
|
||||
BOOST_CHECK_EQUAL(HexStr(signature), input["expected"]["witness"][0].get_str());
|
||||
|
||||
Reference in New Issue
Block a user