diff options
| author | Pieter Wuille <[email protected]> | 2012-10-20 14:53:43 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2012-10-20 14:53:43 -0700 |
| commit | f50fb5470b1d3a65a513b3a9a77209ccad590a19 (patch) | |
| tree | 9f6418cfadbd89a3cfac923b0d3c5cdd7822ffb5 /src/script.cpp | |
| parent | Merge pull request #1677 from sipa/ultraprune (diff) | |
| parent | Use CHashWriter also in SignatureHash(), and for message signing (diff) | |
| download | discoin-f50fb5470b1d3a65a513b3a9a77209ccad590a19.tar.xz discoin-f50fb5470b1d3a65a513b3a9a77209ccad590a19.zip | |
Merge pull request #1936 from sipa/morehashwriter
Use CHashWriter also in SignatureHash(), and for message signing
Diffstat (limited to 'src/script.cpp')
| -rw-r--r-- | src/script.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script.cpp b/src/script.cpp index 61112b17c..36d208c24 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -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(); } |