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

Function MutateTxDelOutput

src/bitcoin-tx.cpp:551–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549}
550
551static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx)
552{
553 // parse requested deletion index
554 int64_t outIdx;
555 if (!ParseInt64(strOutIdx, &outIdx) || outIdx < 0 || outIdx >= static_cast<int64_t>(tx.vout.size())) {
556 throw std::runtime_error("Invalid TX output index '" + strOutIdx + "'");
557 }
558
559 // delete output from transaction
560 tx.vout.erase(tx.vout.begin() + outIdx);
561}
562
563static const unsigned int N_SIGHASH_OPTS = 7;
564static const struct {

Callers 1

MutateTxFunction · 0.85

Calls 4

ParseInt64Function · 0.50
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected