aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-11-02 10:07:46 -0400
committerPieter Wuille <pieter@wuille.net>2021-11-29 17:59:44 -0500
commit11daf6ceb1d9ea1f8d638b123eecfe39d162a7c3 (patch)
tree04577b15fa2b9dbbf611377c5a0e23bf2a705768 /src/pubkey.h
parent568dd2f83900a11a4dbba1250722791a135bf0a9 (diff)
downloadbitcoin-11daf6ceb1d9ea1f8d638b123eecfe39d162a7c3.tar.xz
More Span simplifications
Based on suggestions by MarcoFalke <falke.marco@gmail.com>
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index cba104a5e5..2453c92d92 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -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.
*