Compare two descriptors. If only one of them has a checksum, the checksum is ignored. */
| 58 | |
| 59 | /** Compare two descriptors. If only one of them has a checksum, the checksum is ignored. */ |
| 60 | bool EqualDescriptor(std::string a, std::string b) |
| 61 | { |
| 62 | bool a_check = (a.size() > 9 && a[a.size() - 9] == '#'); |
| 63 | bool b_check = (b.size() > 9 && b[b.size() - 9] == '#'); |
| 64 | if (a_check != b_check) { |
| 65 | if (a_check) a = a.substr(0, a.size() - 9); |
| 66 | if (b_check) b = b.substr(0, b.size() - 9); |
| 67 | } |
| 68 | return a == b; |
| 69 | } |
| 70 | |
| 71 | bool EqualSigningProviders(const FlatSigningProvider& a, const FlatSigningProvider& b) |
| 72 | { |
no test coverage detected