Merge pull request #1936 from sipa/morehashwriter

Use CHashWriter also in SignatureHash(), and for message signing
This commit is contained in:
Pieter Wuille
2012-10-20 14:53:43 -07:00
2 changed files with 6 additions and 7 deletions

View File

@@ -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();
}