diff --git a/lib/script.js b/lib/script.js index 63376b2..149946c 100644 --- a/lib/script.js +++ b/lib/script.js @@ -267,6 +267,8 @@ Script.prototype.writeBuffer = function(buf) { opcodenum = Opcode.map.OP_PUSHDATA2; } else if (buf.length < Math.pow(2, 32)) { opcodenum = Opcode.map.OP_PUSHDATA4; + } else { + throw new Error("You can't push that much data"); } this.chunks.push({ buf: buf,