Compare two public keys represented by this provider. * Used by the Miniscript descriptors to check for duplicate keys in the script. */
| 190 | * Used by the Miniscript descriptors to check for duplicate keys in the script. |
| 191 | */ |
| 192 | bool operator<(PubkeyProvider& other) const { |
| 193 | FlatSigningProvider dummy; |
| 194 | |
| 195 | std::optional<CPubKey> a = GetPubKey(0, dummy, dummy); |
| 196 | std::optional<CPubKey> b = other.GetPubKey(0, dummy, dummy); |
| 197 | |
| 198 | return a < b; |
| 199 | } |
| 200 | |
| 201 | /** Derive a public key and put it into out. |
| 202 | * read_cache is the cache to read keys from (if not nullptr) |