mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
More Span simplifications
Based on suggestions by MarcoFalke <falke.marco@gmail.com>
This commit is contained in:
parent
568dd2f839
commit
11daf6ceb1
14 changed files with 20 additions and 21 deletions
|
|
@ -1252,7 +1252,7 @@ std::unique_ptr<PubkeyProvider> InferXOnlyPubkey(const XOnlyPubKey& xkey, ParseS
|
|||
std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptContext ctx, const SigningProvider& provider)
|
||||
{
|
||||
if (ctx == ParseScriptContext::P2TR && script.size() == 34 && script[0] == 32 && script[33] == OP_CHECKSIG) {
|
||||
XOnlyPubKey key{Span<const unsigned char>{script.data() + 1, script.data() + 33}};
|
||||
XOnlyPubKey key{Span{script}.subspan(1, 32)};
|
||||
return std::make_unique<PKDescriptor>(InferXOnlyPubkey(key, ctx, provider));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue