mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 05:03:16 +01:00
Merge pull request #1936 from sipa/morehashwriter
Use CHashWriter also in SignatureHash(), and for message signing
This commit is contained in:
@@ -1183,10 +1183,9 @@ uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int
|
||||
}
|
||||
|
||||
// Serialize and hash
|
||||
CDataStream ss(SER_GETHASH, 0);
|
||||
ss.reserve(10000);
|
||||
CHashWriter ss(SER_GETHASH, 0);
|
||||
ss << txTmp << nHashType;
|
||||
return Hash(ss.begin(), ss.end());
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user