MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / EqualDescriptor

Function EqualDescriptor

src/test/descriptor_tests.cpp:60–69  ·  view source on GitHub ↗

Compare two descriptors. If only one of them has a checksum, the checksum is ignored. */

Source from the content-addressed store, hash-verified

58
59/** Compare two descriptors. If only one of them has a checksum, the checksum is ignored. */
60bool 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
71bool EqualSigningProviders(const FlatSigningProvider& a, const FlatSigningProvider& b)
72{

Callers 2

DoCheckFunction · 0.85
CheckUnusedFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected