tests: make use of the default behaviour
This commit is contained in:
parent
2234e496d1
commit
929d926774
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
||||||
var assert = require('assert')
|
var assert = require('assert')
|
||||||
var networks = require('../src/networks')
|
|
||||||
var scripts = require('../src/scripts')
|
var scripts = require('../src/scripts')
|
||||||
|
|
||||||
var Address = require('../src/address')
|
var Address = require('../src/address')
|
||||||
|
@ -109,7 +108,7 @@ describe('Transaction', function() {
|
||||||
var tx = new Transaction()
|
var tx = new Transaction()
|
||||||
|
|
||||||
f.raw.ins.forEach(function(txIn, i) {
|
f.raw.ins.forEach(function(txIn, i) {
|
||||||
var script = txIn.script ? Script.fromHex(txIn.script) : Script.EMPTY
|
var script = txIn.script ? Script.fromHex(txIn.script) : undefined
|
||||||
var j = tx.addInput(txIn.hash, txIn.index, txIn.sequence, script)
|
var j = tx.addInput(txIn.hash, txIn.index, txIn.sequence, script)
|
||||||
|
|
||||||
assert.equal(i, j)
|
assert.equal(i, j)
|
||||||
|
@ -120,7 +119,7 @@ describe('Transaction', function() {
|
||||||
if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE
|
if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE
|
||||||
|
|
||||||
assert.equal(tx.ins[i].sequence, sequence)
|
assert.equal(tx.ins[i].sequence, sequence)
|
||||||
assert.equal(tx.ins[i].script, script)
|
assert.equal(tx.ins[i].script, script || Script.EMPTY)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue