| 478 | } |
| 479 | |
| 480 | static 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 | |
| 492 | static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx) |
| 493 | { |
no test coverage detected