Count the number of times the string "xpub" appears in a descriptor string
| 78 | |
| 79 | // Count the number of times the string "xpub" appears in a descriptor string |
| 80 | static size_t CountXpubs(const std::string& desc) |
| 81 | { |
| 82 | size_t count = 0; |
| 83 | size_t p = desc.find("xpub", 0); |
| 84 | while (p != std::string::npos) { |
| 85 | count++; |
| 86 | p = desc.find("xpub", p + 1); |
| 87 | } |
| 88 | return count; |
| 89 | } |
| 90 | |
| 91 | const std::set<std::vector<uint32_t>> ONLY_EMPTY{{}}; |
| 92 |