Use CHashWriter also in SignatureHash(), and for message signing

This commit is contained in:
Pieter Wuille
2012-10-19 23:13:44 +02:00
parent 485d667748
commit 8980a50924
2 changed files with 6 additions and 7 deletions

View File

@@ -1117,10 +1117,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();
}