| 507 | } |
| 508 | |
| 509 | static 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 | |
| 518 | static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx) |
| 519 | { |