diff options
author | fanquake <fanquake@gmail.com> | 2020-10-17 22:25:09 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-10-17 22:46:56 +0800 |
commit | 5d644778da48cb461c923235826a7db4a2946f00 (patch) | |
tree | c0e33605fab6bb384ce96d362cdb6785fc30b27c | |
parent | b3527fd2e9be5a94b84433ae229cdf0aaa2d3e7d (diff) | |
parent | 51365674e828ae95477570019738ab32aa572241 (diff) | |
download | bitcoin-5d644778da48cb461c923235826a7db4a2946f00.tar.xz |
Merge #20169: Taproot follow-up: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract
51365674e828ae95477570019738ab32aa572241 script: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract (practicalswift)
Pull request description:
Make `ComputeEntrySchnorr` and `ComputeEntryECDSA` `const` to clarify contract.
ACKs for top commit:
benthecarman:
ACK 51365674e828ae95477570019738ab32aa572241
theStack:
ACK 51365674e828ae95477570019738ab32aa572241 :ok_hand:
sipa:
utACK 51365674e828ae95477570019738ab32aa572241
Tree-SHA512: 0f7a72bf6df7a97d21045ead9db398d2a9527c358aeeb894dec34a5386da4cc316e2f3326716e960ef8aa47bf73b99d1f92bb6d45dfa7871c84624bcad8a79f1
-rw-r--r-- | src/script/sigcache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index 4a6e04f2eb..c1786140de 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -46,14 +46,14 @@ public: } void - ComputeEntryECDSA(uint256& entry, const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubkey) + ComputeEntryECDSA(uint256& entry, const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubkey) const { CSHA256 hasher = m_salted_hasher_ecdsa; hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(&vchSig[0], vchSig.size()).Finalize(entry.begin()); } void - ComputeEntrySchnorr(uint256& entry, const uint256 &hash, Span<const unsigned char> sig, const XOnlyPubKey& pubkey) + ComputeEntrySchnorr(uint256& entry, const uint256 &hash, Span<const unsigned char> sig, const XOnlyPubKey& pubkey) const { CSHA256 hasher = m_salted_hasher_schnorr; hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(sig.data(), sig.size()).Finalize(entry.begin()); |