MCPcopy Create free account
hub / github.com/ElementsProject/elements / SignSignature

Function SignSignature

src/script/sign.cpp:537–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537bool SignSignature(const SigningProvider &provider, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CConfidentialValue& amount, int nHashType)
538{
539 assert(nIn < txTo.vin.size());
540 txTo.witness.vtxinwit.resize(txTo.vin.size());
541 CTransaction txToConst(txTo);
542 //TransactionSignatureCreator creator(&keystore, &txToConst, nIn, amount, nHashType);
543
544 MutableTransactionSignatureCreator creator(&txTo, nIn, amount, nHashType);
545
546 SignatureData sigdata;
547 bool ret = ProduceSignature(provider, creator, fromPubKey, sigdata);
548 UpdateTransaction(txTo, nIn, sigdata);
549 return ret;
550}
551
552bool SignSignature(const SigningProvider &provider, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
553{

Callers 7

BOOST_AUTO_TEST_CASEFunction · 0.85
CreateCreditAndSpendFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 4

ProduceSignatureFunction · 0.85
UpdateTransactionFunction · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by 7

BOOST_AUTO_TEST_CASEFunction · 0.68
CreateCreditAndSpendFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68