bitpay/bitcore — pull request #208 by maraoz (2014-04-03 19:13:42+00:00)
Title: Add new SignatureHash tests using bitcoin core test data

This adds new passing tests importing sighash data from bitcoin core. To fix our version of `SignatureHash`, `Transaction#hashForSignature()` was re-implemented, following bitcoin core's implementation line-by-line (as much as possible). `TransactionSignatureSerializer` helper class was added for that purpose, which serializes a transaction for signing, following bitcoin core rules (the serialization differs from normal tx serialization in various ways, especially depending on the `hashType` parameter)