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

Function SignTransaction

src/rpc/rawtransaction_util.cpp:563–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561}
562
563void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const UniValue& hashType, UniValue& result, const CBlockIndex* active_chain_tip)
564{
565 int nHashType = ParseSighashString(hashType);
566
567 // Script verification errors
568 std::map<int, bilingual_str> input_errors;
569
570 bool immature_pegin = ValidateTransactionPeginInputs(mtx, active_chain_tip, input_errors);
571 bool complete = SignTransaction(mtx, keystore, coins, nHashType, Params().HashGenesisBlock(), input_errors);
572 SignTransactionResultToJSON(mtx, complete, coins, input_errors, immature_pegin, result);
573}
574
575void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, const std::map<int, bilingual_str>& input_errors, bool immature_pegin, UniValue& result)
576{

Callers 1

Calls 4

ParseSighashStringFunction · 0.85
ParamsClass · 0.50

Tested by

no test coverage detected