File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
var assert = require ( 'assert' )
2
- var networks = require ( '../src/networks' )
3
2
var scripts = require ( '../src/scripts' )
4
3
5
4
var Address = require ( '../src/address' )
@@ -109,7 +108,7 @@ describe('Transaction', function() {
109
108
var tx = new Transaction ( )
110
109
111
110
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
113
112
var j = tx . addInput ( txIn . hash , txIn . index , txIn . sequence , script )
114
113
115
114
assert . equal ( i , j )
@@ -120,7 +119,7 @@ describe('Transaction', function() {
120
119
if ( sequence === undefined ) sequence = Transaction . DEFAULT_SEQUENCE
121
120
122
121
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 )
124
123
} )
125
124
} )
126
125
} )
You can’t perform that action at this time.
0 commit comments