diff options
author | MacroFake <falke.marco@gmail.com> | 2022-06-10 12:02:12 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-07-20 15:34:36 +0200 |
commit | faf9accd662974a69390213fee1b5c6237846b42 (patch) | |
tree | 987a4d2f3ab4898e5eaac32b267174b9e48ee42a /src/pubkey.cpp | |
parent | faa5425629d35708326b255570c51139aef0c8c4 (diff) | |
download | bitcoin-faf9accd662974a69390213fee1b5c6237846b42.tar.xz |
Use HashWriter where possible
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r-- | src/pubkey.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 324f681a0a..a4a1be6388 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -211,16 +211,16 @@ bool XOnlyPubKey::VerifySchnorr(const uint256& msg, Span<const unsigned char> si return secp256k1_schnorrsig_verify(secp256k1_context_verify, sigbytes.data(), msg.begin(), 32, &pubkey); } -static const CHashWriter HASHER_TAPTWEAK = TaggedHash("TapTweak"); +static const HashWriter HASHER_TAPTWEAK{TaggedHash("TapTweak")}; uint256 XOnlyPubKey::ComputeTapTweakHash(const uint256* merkle_root) const { if (merkle_root == nullptr) { // We have no scripts. The actual tweak does not matter, but follow BIP341 here to // allow for reproducible tweaking. - return (CHashWriter(HASHER_TAPTWEAK) << m_keydata).GetSHA256(); + return (HashWriter{HASHER_TAPTWEAK} << m_keydata).GetSHA256(); } else { - return (CHashWriter(HASHER_TAPTWEAK) << m_keydata << *merkle_root).GetSHA256(); + return (HashWriter{HASHER_TAPTWEAK} << m_keydata << *merkle_root).GetSHA256(); } } |