aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/descriptor.cpp6
-rw-r--r--src/script/sign.cpp2
-rw-r--r--src/script/sign.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index c3b4d1ddaa..1c99df147b 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -631,7 +631,7 @@ public:
out.origins.emplace(entry.first.GetID(), std::make_pair<CPubKey, KeyOriginInfo>(CPubKey(entry.first), std::move(entry.second)));
}
- output_scripts = MakeScripts(pubkeys, MakeSpan(subscripts), out);
+ output_scripts = MakeScripts(pubkeys, Span{subscripts}, out);
return true;
}
@@ -974,10 +974,10 @@ std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const S
}
KeyPath path;
DeriveType type = DeriveType::NO;
- if (split.back() == MakeSpan("*").first(1)) {
+ if (split.back() == Span{"*"}.first(1)) {
split.pop_back();
type = DeriveType::UNHARDENED;
- } else if (split.back() == MakeSpan("*'").first(2) || split.back() == MakeSpan("*h").first(2)) {
+ } else if (split.back() == Span{"*'"}.first(2) || split.back() == Span{"*h"}.first(2)) {
split.pop_back();
type = DeriveType::HARDENED;
}
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 8e044b1e00..3f7060879c 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -167,7 +167,7 @@ static bool SignTaprootScript(const SigningProvider& provider, const BaseSignatu
// <xonly pubkey> OP_CHECKSIG
if (script.size() == 34 && script[33] == OP_CHECKSIG && script[0] == 0x20) {
- XOnlyPubKey pubkey(MakeSpan(script).subspan(1, 32));
+ XOnlyPubKey pubkey{Span{script}.subspan(1, 32)};
std::vector<unsigned char> sig;
if (CreateTaprootScriptSig(creator, sigdata, provider, sig, pubkey, leaf_hash, sigversion)) {
result = Vector(std::move(sig));
diff --git a/src/script/sign.h b/src/script/sign.h
index 62335b644a..50525af332 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -149,7 +149,7 @@ void SerializeHDKeypaths(Stream& s, const std::map<CPubKey, KeyOriginInfo>& hd_k
if (!keypath_pair.first.IsValid()) {
throw std::ios_base::failure("Invalid CPubKey being serialized");
}
- SerializeToVector(s, type, MakeSpan(keypath_pair.first));
+ SerializeToVector(s, type, Span{keypath_pair.first});
WriteCompactSize(s, (keypath_pair.second.path.size() + 1) * sizeof(uint32_t));
s << keypath_pair.second.fingerprint;
for (const auto& path : keypath_pair.second.path) {