| 549 | } |
| 550 | |
| 551 | static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx) |
| 552 | { |
| 553 | // parse requested deletion index |
| 554 | int64_t outIdx; |
| 555 | if (!ParseInt64(strOutIdx, &outIdx) || outIdx < 0 || outIdx >= static_cast<int64_t>(tx.vout.size())) { |
| 556 | throw std::runtime_error("Invalid TX output index '" + strOutIdx + "'"); |
| 557 | } |
| 558 | |
| 559 | // delete output from transaction |
| 560 | tx.vout.erase(tx.vout.begin() + outIdx); |
| 561 | } |
| 562 | |
| 563 | static const unsigned int N_SIGHASH_OPTS = 7; |
| 564 | static const struct { |
no test coverage detected