| 108 | } |
| 109 | |
| 110 | std::set<std::pair<CPubKey, KeyOriginInfo>> GetKeyOriginData(const FlatSigningProvider& provider, int flags) { |
| 111 | std::set<std::pair<CPubKey, KeyOriginInfo>> ret; |
| 112 | for (const auto& [_, data] : provider.origins) { |
| 113 | if (flags & XONLY_KEYS) { |
| 114 | unsigned char bytes[33]; |
| 115 | BOOST_CHECK_EQUAL(data.first.size(), 33); |
| 116 | std::copy(data.first.begin(), data.first.end(), bytes); |
| 117 | bytes[0] = 0x02; |
| 118 | CPubKey norm_pubkey{bytes}; |
| 119 | KeyOriginInfo norm_origin = data.second; |
| 120 | std::fill(std::begin(norm_origin.fingerprint), std::end(norm_origin.fingerprint), 0); // fingerprints don't necessarily match. |
| 121 | ret.emplace(norm_pubkey, norm_origin); |
| 122 | } else { |
| 123 | ret.insert(data); |
| 124 | } |
| 125 | } |
| 126 | return ret; |
| 127 | } |
| 128 | |
| 129 | void DoCheck(const std::string& prv, const std::string& pub, const std::string& norm_prv, const std::string& norm_pub, int flags, const std::vector<std::vector<std::string>>& scripts, const std::optional<OutputType>& type, const std::set<std::vector<uint32_t>>& paths = ONLY_EMPTY, |
| 130 | bool replace_apostrophe_with_h_in_prv=false, bool replace_apostrophe_with_h_in_pub=false) |