Better test vectors for witness serialization (available on testnet)

This commit is contained in:
Thomas Kerin 2016-11-05 20:52:49 +01:00 committed by Daniel Cousens
parent c1d6a5c0d7
commit 035ec47868
2 changed files with 412 additions and 51 deletions

View file

@ -46,6 +46,14 @@ describe('Transaction', function () {
var id = f.id || f.hash
var txHex = f.hex || f.txHex
if (f.hasWitness) {
it('imports ' + f.description + ' (' + id + ') as witness', function () {
var actual = Transaction.fromHex(f.witnessHex)
assert.strictEqual(actual.toHex(), f.witnessHex, actual.toHex())
})
}
it('imports ' + f.description + ' (' + id + ')', function () {
var actual = Transaction.fromHex(txHex)