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

Function MutateTxDelInput

src/bitcoin-tx.cpp:480–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480static void MutateTxDelInput(CMutableTransaction& tx, const std::string& strInIdx)
481{
482 // parse requested deletion index
483 int64_t inIdx;
484 if (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size())) {
485 throw std::runtime_error("Invalid TX input index '" + strInIdx + "'");
486 }
487
488 // delete input from transaction
489 tx.vin.erase(tx.vin.begin() + inIdx);
490}
491
492static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx)
493{

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