fix: pass correct params into CHashWriter

This commit is contained in:
UdjinM6 2023-06-10 23:14:28 +03:00
parent a760e33236
commit 62540743ef
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
uint256 CalcTxInputsHash(const CTransaction& tx) uint256 CalcTxInputsHash(const CTransaction& tx)
{ {
CHashWriter hw(CLIENT_VERSION, SER_GETHASH); CHashWriter hw(SER_GETHASH, CLIENT_VERSION);
for (const auto& in : tx.vin) { for (const auto& in : tx.vin) {
hw << in.prevout; hw << in.prevout;
} }

View File

@ -628,7 +628,7 @@ uint256 BuildCommitmentHash(Consensus::LLMQType llmqType, const uint256& blockHa
const std::vector<bool>& validMembers, const CBLSPublicKey& pubKey, const std::vector<bool>& validMembers, const CBLSPublicKey& pubKey,
const uint256& vvecHash) const uint256& vvecHash)
{ {
CHashWriter hw(SER_NETWORK, 0); CHashWriter hw(SER_GETHASH, 0);
hw << llmqType; hw << llmqType;
hw << blockHash; hw << blockHash;
hw << DYNBITSET(validMembers); hw << DYNBITSET(validMembers);