File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,6 @@ Script.fromASM = function(str) {
167167 opcodenum = Opcode . OP_PUSHDATA2
168168 } else if ( buf . length <= 0x100000000 ) {
169169 opcodenum = Opcode . OP_PUSHDATA4
170- } else {
171- throw new Error ( 'Pushdata data is too long' ) ;
172170 }
173171 script . chunks . push ( {
174172 buf : buf ,
Original file line number Diff line number Diff line change @@ -211,7 +211,8 @@ describe('Script', function() {
211211 const data3 = '01' . repeat ( 0x100 + 1 )
212212 const data4 = '01' . repeat ( 0x10000 )
213213 const data5 = '01' . repeat ( 0x10000 + 1 )
214- var asm = `${ data0 } ${ data1 } ${ data2 } ${ data3 } ${ data4 } ${ data5 } ` ;
214+ const data6 = '01' . repeat ( 1 )
215+ var asm = `${ data0 } ${ data1 } ${ data2 } ${ data3 } ${ data4 } ${ data5 } ${ data6 } ` ;
215216 var script = Script . fromASM ( asm ) ;
216217 script . chunks [ 0 ] . opcodenum . should . equal ( 0x4b ) ;
217218 script . chunks [ 1 ] . opcodenum . should . equal ( Opcode . OP_PUSHDATA1 ) ;
@@ -224,6 +225,8 @@ describe('Script', function() {
224225 script . chunks [ 4 ] . len . should . equal ( 0x10000 ) ;
225226 script . chunks [ 5 ] . opcodenum . should . equal ( Opcode . OP_PUSHDATA4 ) ;
226227 script . chunks [ 5 ] . len . should . equal ( 0x10000 + 1 ) ;
228+ script . chunks [ 6 ] . opcodenum . should . equal ( 1 ) ;
229+ script . chunks [ 6 ] . len . should . equal ( 1 ) ;
227230 } ) ;
228231 } ) ;
229232
You can’t perform that action at this time.
0 commit comments