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

Function MutateTx

src/bitcoin-tx.cpp:736–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734};
735
736static void MutateTx(CMutableTransaction& tx, const std::string& command,
737 const std::string& commandVal)
738{
739 std::unique_ptr<Secp256k1Init> ecc;
740
741 if (command == "nversion")
742 MutateTxVersion(tx, commandVal);
743 else if (command == "locktime")
744 MutateTxLocktime(tx, commandVal);
745 else if (command == "replaceable") {
746 MutateTxRBFOptIn(tx, commandVal);
747 }
748
749 else if (command == "delin")
750 MutateTxDelInput(tx, commandVal);
751 else if (command == "in")
752 MutateTxAddInput(tx, commandVal);
753
754 else if (command == "delout")
755 MutateTxDelOutput(tx, commandVal);
756 else if (command == "outaddr")
757 MutateTxAddOutAddr(tx, commandVal);
758 else if (command == "outpubkey") {
759 ecc.reset(new Secp256k1Init());
760 MutateTxAddOutPubKey(tx, commandVal);
761 } else if (command == "outmultisig") {
762 ecc.reset(new Secp256k1Init());
763 MutateTxAddOutMultiSig(tx, commandVal);
764 } else if (command == "outscript")
765 MutateTxAddOutScript(tx, commandVal);
766 else if (command == "outdata")
767 MutateTxAddOutData(tx, commandVal);
768
769 else if (command == "sign") {
770 ecc.reset(new Secp256k1Init());
771 MutateTxSign(tx, commandVal);
772 }
773
774 else if (command == "load")
775 RegisterLoad(commandVal);
776
777 else if (command == "set")
778 RegisterSet(commandVal);
779
780 else
781 throw std::runtime_error("unknown command");
782}
783
784static void OutputTxJSON(const CTransaction& tx)
785{

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