Closed sidazhang closed 10 years ago
@MidnightLightning,
https://github.com/cryptocoinjs/btc-transaction/commit/5daede028f63a9a605bc2ec83d4c44895d030cb3
This latest commit fixes the issue we discussed earlier. valueOf only supports up to 32 bit integer and so we should always convert to string first and then initialize biginteger
https://github.com/cryptocoinjs/btc-transaction/commit/461e17826b9d6436222bd8ce9de4efa748747d86
Reversing the value bytes when calculating output and tests.
@MidnightLightning @jprichardson Can I get an ack on these series of bugfixes?
Just ack from jp I will merge this.
Value bytes should be reversed in
new TransactionOut(data)
so that it is LEThe correct example is demonstrated here: https://github.com/cryptocoinjs/btc-transaction/blob/master/lib/transaction.js#L132
I have included tests to make sure that the
new TransactionOut()
andTransaction.addOutput()
produce the same byte order