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

Function MutateTxDelInput

src/bitcoin-tx.cpp:509–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509static void MutateTxDelInput(CMutableTransaction& tx, const std::string& strInIdx)
510{
511 const auto idx{ToIntegral<uint32_t>(strInIdx)};
512 if (!idx || idx >= tx.vin.size()) {
513 throw std::runtime_error("Invalid TX input index '" + strInIdx + "'");
514 }
515 tx.vin.erase(tx.vin.begin() + *idx);
516}
517
518static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx)
519{

Callers 1

MutateTxFunction · 0.85

Calls 3

sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected