aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/descriptor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index ae9dba6a50..83b07ae459 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -21,6 +21,7 @@
#include <util/strencodings.h>
#include <util/vector.h>
+#include <algorithm>
#include <memory>
#include <numeric>
#include <optional>
@@ -1405,11 +1406,11 @@ std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const S
}
KeyPath path;
DeriveType type = DeriveType::NO;
- if (split.back() == Span{"*"}.first(1)) {
+ if (std::ranges::equal(split.back(), Span{"*"}.first(1))) {
split.pop_back();
type = DeriveType::UNHARDENED;
- } else if (split.back() == Span{"*'"}.first(2) || split.back() == Span{"*h"}.first(2)) {
- apostrophe = split.back() == Span{"*'"}.first(2);
+ } else if (std::ranges::equal(split.back(), Span{"*'"}.first(2)) || std::ranges::equal(split.back(), Span{"*h"}.first(2))) {
+ apostrophe = std::ranges::equal(split.back(), Span{"*'"}.first(2));
split.pop_back();
type = DeriveType::HARDENED;
}