| 487 | } |
| 488 | |
| 489 | void Check(const std::string& prv, const std::string& pub, const std::string& norm_pub, int flags, |
| 490 | const std::vector<std::vector<std::string>>& scripts, const std::optional<OutputType>& type, std::optional<uint256> op_desc_id = std::nullopt, |
| 491 | const std::set<std::vector<uint32_t>>& paths = ONLY_EMPTY, uint32_t spender_nlocktime=0, |
| 492 | uint32_t spender_nsequence=CTxIn::SEQUENCE_FINAL, std::map<std::vector<uint8_t>, std::vector<uint8_t>> preimages={}, |
| 493 | std::optional<std::string> expected_prv = std::nullopt, std::optional<std::string> expected_pub = std::nullopt, int desc_index = 0) |
| 494 | { |
| 495 | // Do not replace apostrophes with 'h' in prv and pub |
| 496 | DoCheck(prv, pub, norm_pub, flags, scripts, type, op_desc_id, paths, /*replace_apostrophe_with_h_in_prv=*/false, |
| 497 | /*replace_apostrophe_with_h_in_pub=*/false, /*spender_nlocktime=*/spender_nlocktime, |
| 498 | /*spender_nsequence=*/spender_nsequence, /*preimages=*/preimages, |
| 499 | expected_prv, expected_pub, desc_index); |
| 500 | |
| 501 | // Replace apostrophes with 'h' both in prv and in pub, if apostrophes are found in both |
| 502 | if (prv.find('\'') != std::string::npos && pub.find('\'') != std::string::npos) { |
| 503 | DoCheck(prv, pub, norm_pub, flags, scripts, type, op_desc_id, paths, /*replace_apostrophe_with_h_in_prv=*/true, |
| 504 | /*replace_apostrophe_with_h_in_pub=*/true, /*spender_nlocktime=*/spender_nlocktime, |
| 505 | /*spender_nsequence=*/spender_nsequence, /*preimages=*/preimages, |
| 506 | expected_prv, expected_pub, desc_index); |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | void CheckMultipath(const std::string& prv, |
| 511 | const std::string& pub, |
no test coverage detected