More Span simplifications

Based on suggestions by MarcoFalke <falke.marco@gmail.com>
This commit is contained in:
Pieter Wuille
2021-11-02 10:07:46 -04:00
parent 568dd2f839
commit 11daf6ceb1
14 changed files with 20 additions and 21 deletions

View File

@@ -240,7 +240,7 @@ public:
explicit XOnlyPubKey(Span<const unsigned char> bytes);
/** Construct an x-only pubkey from a normal pubkey. */
explicit XOnlyPubKey(const CPubKey& pubkey) : XOnlyPubKey(Span<const unsigned char>(pubkey.begin() + 1, pubkey.begin() + 33)) {}
explicit XOnlyPubKey(const CPubKey& pubkey) : XOnlyPubKey(Span{pubkey}.subspan(1, 32)) {}
/** Verify a Schnorr signature against this public key.
*