Great idea! Will update the issue with your comment


On Wed, Mar 26, 2014 at 5:50 PM, Ryan X. Charles
<notifications@github.com>wrote:

> In test/test.sighash.js:
>
> > +        bytes.put(tx.outs[i].v);
> > +        bytes.varint(tx.outs[i].s.length);
> > +        bytes.put(tx.outs[i].s);
> > +      }
> > +    }
> > +  }
> > +
> > +  bytes.word32le(tx.lock_time);
> > +
> > +  var buffer = bytes.buffer();
> > +
> > +  // Append hashType
> > +  buffer = Buffer.concat([buffer, new Buffer([parseInt(hashType), 0, 0, 0])]);
> > +
> > +  return util.twoSha256(buffer);
> > +};
>
> If I understand this code correctly, I think we could just run the
> bitcoind test, and export the hashes it produces to a file, and import
> those into bitcore, and make sure the hashes are calculated exactly the
> same.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/bitpay/bitcore/pull/190/files#r10998287>
> .
>