mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 80f00cafde into merged_master (Bitcoin PR bitcoin/bitcoin#29071)
This commit is contained in:
commit
ce9cd2dfd7
21 changed files with 76 additions and 74 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue