mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-28 01:57:06 +02:00
Merge #20169: Taproot follow-up: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract
51365674e8
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: ACK51365674e8
theStack: ACK51365674e8
👌 sipa: utACK51365674e8
Tree-SHA512: 0f7a72bf6df7a97d21045ead9db398d2a9527c358aeeb894dec34a5386da4cc316e2f3326716e960ef8aa47bf73b99d1f92bb6d45dfa7871c84624bcad8a79f1
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user