tests: move transactionVersion into toBuffer

This commit is contained in:
Daniel Cousens 2016-11-14 13:22:05 +11:00 committed by Daniel Cousens
parent dfcb04c9b4
commit 87269fe73e

View file

@ -73,6 +73,13 @@ describe('Transaction', function () {
}, new RegExp(f.exception)) }, new RegExp(f.exception))
}) })
}) })
it('.version should be interpreted as an int32le', function () {
var txHex = 'ffffffff0000ffffffff'
var tx = Transaction.fromHex(txHex)
assert.equal(-1, tx.version)
assert.equal(0xffffffff, tx.locktime)
})
}) })
describe('toBuffer/toHex', function () { describe('toBuffer/toHex', function () {
@ -103,15 +110,6 @@ describe('Transaction', function () {
}) })
}) })
describe('transactionVersion', function () {
it('should be interpreted as an int32le', function () {
var txHex = 'ffffffff0000ffffffff'
var tx = Transaction.fromHex(txHex)
assert.equal(-1, tx.version)
assert.equal(0xffffffff, tx.locktime)
})
})
describe('addInput', function () { describe('addInput', function () {
var prevTxHash var prevTxHash
beforeEach(function () { beforeEach(function () {