MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / MutateTx

Function MutateTx

src/bitcoin-tx.cpp:696–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696static void MutateTx(CMutableTransaction& tx, const std::string& command,
697 const std::string& commandVal)
698{
699 std::unique_ptr<ECC_Context> ecc;
700
701 if (command == "nversion")
702 MutateTxVersion(tx, commandVal);
703 else if (command == "locktime")
704 MutateTxLocktime(tx, commandVal);
705 else if (command == "replaceable") {
706 MutateTxRBFOptIn(tx, commandVal);
707 }
708
709 else if (command == "delin")
710 MutateTxDelInput(tx, commandVal);
711 else if (command == "in")
712 MutateTxAddInput(tx, commandVal);
713
714 else if (command == "delout")
715 MutateTxDelOutput(tx, commandVal);
716 else if (command == "outaddr")
717 MutateTxAddOutAddr(tx, commandVal);
718 else if (command == "outpubkey") {
719 ecc.reset(new ECC_Context());
720 MutateTxAddOutPubKey(tx, commandVal);
721 } else if (command == "outmultisig") {
722 ecc.reset(new ECC_Context());
723 MutateTxAddOutMultiSig(tx, commandVal);
724 } else if (command == "outscript")
725 MutateTxAddOutScript(tx, commandVal);
726 else if (command == "outdata")
727 MutateTxAddOutData(tx, commandVal);
728
729 else if (command == "sign") {
730 ecc.reset(new ECC_Context());
731 MutateTxSign(tx, commandVal);
732 }
733
734 else if (command == "load")
735 RegisterLoad(commandVal);
736
737 else if (command == "set")
738 RegisterSet(commandVal);
739
740 else
741 throw std::runtime_error("unknown command");
742}
743
744static void OutputTxJSON(const CTransaction& tx)
745{

Callers 1

CommandLineRawTxFunction · 0.85

Calls 15

MutateTxVersionFunction · 0.85
MutateTxLocktimeFunction · 0.85
MutateTxRBFOptInFunction · 0.85
MutateTxDelInputFunction · 0.85
MutateTxAddInputFunction · 0.85
MutateTxDelOutputFunction · 0.85
MutateTxAddOutAddrFunction · 0.85
MutateTxAddOutPubKeyFunction · 0.85
MutateTxAddOutMultiSigFunction · 0.85
MutateTxAddOutScriptFunction · 0.85
MutateTxAddOutDataFunction · 0.85
MutateTxSignFunction · 0.85

Tested by

no test coverage detected