MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / MutateTxDelOutput

Function MutateTxDelOutput

src/bitcoin-tx.cpp:492–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx)
493{
494 // parse requested deletion index
495 int64_t outIdx;
496 if (!ParseInt64(strOutIdx, &outIdx) || outIdx < 0 || outIdx >= static_cast<int64_t>(tx.vout.size())) {
497 throw std::runtime_error("Invalid TX output index '" + strOutIdx + "'");
498 }
499
500 // delete output from transaction
501 tx.vout.erase(tx.vout.begin() + outIdx);
502}
503
504static const unsigned int N_SIGHASH_OPTS = 12;
505static const struct {

Callers 1

MutateTxFunction · 0.85

Calls 4

ParseInt64Function · 0.70
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected