From 929d926774ad4ea0b45f06312a10e1ada2edfb7f Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Fri, 17 Oct 2014 14:22:22 +1100 Subject: [PATCH] tests: make use of the default behaviour --- test/transaction.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/transaction.js b/test/transaction.js index 3bd0192..d07061a 100644 --- a/test/transaction.js +++ b/test/transaction.js @@ -1,5 +1,4 @@ var assert = require('assert') -var networks = require('../src/networks') var scripts = require('../src/scripts') var Address = require('../src/address') @@ -109,7 +108,7 @@ describe('Transaction', function() { var tx = new Transaction() 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) assert.equal(i, j) @@ -120,7 +119,7 @@ describe('Transaction', function() { if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE assert.equal(tx.ins[i].sequence, sequence) - assert.equal(tx.ins[i].script, script) + assert.equal(tx.ins[i].script, script || Script.EMPTY) }) }) })