| 490 | } |
| 491 | |
| 492 | static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx) |
| 493 | { |
| 494 | // parse requested deletion index |
| 495 | int64_t outIdx; |
| 496 | if (!ParseInt64(strOutIdx, &outIdx) || outIdx < 0 || outIdx >= static_cast<int64_t>(tx.vout.size())) { |
| 497 | throw std::runtime_error("Invalid TX output index '" + strOutIdx + "'"); |
| 498 | } |
| 499 | |
| 500 | // delete output from transaction |
| 501 | tx.vout.erase(tx.vout.begin() + outIdx); |
| 502 | } |
| 503 | |
| 504 | static const unsigned int N_SIGHASH_OPTS = 12; |
| 505 | static const struct { |
no test coverage detected