Commit graph

8 commits

Author SHA1 Message Date
jtimon
f5745fa52a Declare SignatureHash() in script.h 2014-08-01 17:45:09 +02:00
Philip Kaufmann
6354935c48 move rand functions from util to new random.h/.cpp 2014-07-09 09:42:19 +02:00
Pieter Wuille
4949004d68 Add CMutableTransaction and make CTransaction immutable.
In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.
2014-06-21 22:59:03 +02:00
Manuel Araoz
81bfb5aebf add checks for deserialization errors 2014-03-31 15:07:46 -03:00
Manuel Araoz
232aa9e034 Add code generating data/sighash.json test data 2014-03-31 12:39:32 -03:00
Manuel Araoz
43cb41859e Add sighash tests from data file 2014-03-31 11:19:19 -03:00
Wladimir J. van der Laan
3fc6846181 Add licenses for tests and test data
- Add license headers to source files (years based on commit dates)
  in `src/test` as well as `qa`
- Add `README.md` to `src/test/data` specifying MIT license

Fixes #3848
2014-03-18 10:20:55 +01:00
Pieter Wuille
f5857e5cb5 Inline signature serializer
Instead of building a full copy of a CTransaction being signed, and
then modifying bits and pieces until its fits the form necessary
for computing the signature hash, use a wrapper serializer that
only serializes the necessary bits on-the-fly.

This makes it easier to see which data is actually being hash,
reduces load on the heap, and also marginally improves performances
(around 3-4us/sigcheck here). The performance improvements are much
larger for large transactions, though.

The old implementation of SignatureHash is moved to a unit tests,
to test whether the old and new algorithm result in the same value
for randomly-constructed transactions.
2013-09-28 18:37:00 +02:00