Skip to content

Commit 929d926

Browse files
committed
tests: make use of the default behaviour
1 parent 2234e49 commit 929d926

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/transaction.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var assert = require('assert')
2-
var networks = require('../src/networks')
32
var scripts = require('../src/scripts')
43

54
var Address = require('../src/address')
@@ -109,7 +108,7 @@ describe('Transaction', function() {
109108
var tx = new Transaction()
110109

111110
f.raw.ins.forEach(function(txIn, i) {
112-
var script = txIn.script ? Script.fromHex(txIn.script) : Script.EMPTY
111+
var script = txIn.script ? Script.fromHex(txIn.script) : undefined
113112
var j = tx.addInput(txIn.hash, txIn.index, txIn.sequence, script)
114113

115114
assert.equal(i, j)
@@ -120,7 +119,7 @@ describe('Transaction', function() {
120119
if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE
121120

122121
assert.equal(tx.ins[i].sequence, sequence)
123-
assert.equal(tx.ins[i].script, script)
122+
assert.equal(tx.ins[i].script, script || Script.EMPTY)
124123
})
125124
})
126125
})

0 commit comments

Comments
 (0)