minimaldata.
This commit is contained in:
parent
ec5c548fe1
commit
6fc3c15c77
@ -3921,6 +3921,18 @@ Script.encode = function encode(code, writer) {
|
||||
if (op.length === 0) {
|
||||
p.writeU8(opcodes.OP_0);
|
||||
} else if (op.length <= 0x4b) {
|
||||
if (op.length === 1) {
|
||||
if (op[0] === 0) {
|
||||
p.writeU8(opcodes.OP_0);
|
||||
continue;
|
||||
} else if (op[0] >= 1 && op[0] <= 16) {
|
||||
p.writeU8(op[0] + 0x50);
|
||||
continue;
|
||||
} else if (op[0] === 0xff) {
|
||||
p.writeU8(opcodes.OP_1NEGATE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
p.writeU8(op.length);
|
||||
p.writeBytes(op);
|
||||
} else if (op.length <= 0xff) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user