| 537 | } |
| 538 | |
| 539 | static void MutateTxDelInput(CMutableTransaction& tx, const std::string& strInIdx) |
| 540 | { |
| 541 | // parse requested deletion index |
| 542 | int64_t inIdx; |
| 543 | if (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size())) { |
| 544 | throw std::runtime_error("Invalid TX input index '" + strInIdx + "'"); |
| 545 | } |
| 546 | |
| 547 | // delete input from transaction |
| 548 | tx.vin.erase(tx.vin.begin() + inIdx); |
| 549 | } |
| 550 | |
| 551 | static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx) |
| 552 | { |
no test coverage detected