File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function compile (chunks) {
3939 // data chunk
4040 if ( Buffer . isBuffer ( chunk ) ) {
4141 // adhere to BIP62.3, minimal push policy
42- if ( chunk . length === 1 && chunk [ 0 ] >= 1 && chunk [ 0 ] <= 16 ) {
42+ if ( chunk . length === 1 && ( chunk [ 0 ] === 0x81 || chunk [ 0 ] >= 1 && chunk [ 0 ] <= 16 ) ) {
4343 return accum + 1
4444 }
4545
@@ -64,6 +64,12 @@ function compile (chunks) {
6464 return
6565 }
6666
67+ if ( chunk . length === 1 && chunk [ 0 ] === 0x81 ) {
68+ buffer . writeUInt8 ( OPS . OP_1NEGATE , offset )
69+ offset += 1
70+ return
71+ }
72+
6773 offset += bufferutils . writePushDataInt ( buffer , chunk . length , offset )
6874
6975 chunk . copy ( buffer , offset )
Original file line number Diff line number Diff line change 11{
22 "valid" : [
3+ {
4+ "asm" : " OP_1NEGATE" ,
5+ "script" : " 4f" ,
6+ "stack" : [
7+ " 81"
8+ ]
9+ },
310 {
411 "asm" : " 304402207515cf147d201f411092e6be5a64a6006f9308fad7b2a8fdaab22cd86ce764c202200974b8aca7bf51dbf54150d3884e1ae04f675637b926ec33bf75939446f6ca2801" ,
512 "script" : " 47304402207515cf147d201f411092e6be5a64a6006f9308fad7b2a8fdaab22cd86ce764c202200974b8aca7bf51dbf54150d3884e1ae04f675637b926ec33bf75939446f6ca2801" ,
You can’t perform that action at this time.
0 commit comments