From 1d4a71852fa623c5153f7d053b314694e55d32ca Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 11 Aug 2015 17:05:27 +1000 Subject: [PATCH] Script: remove use of assert --- src/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/script.js b/src/script.js index 12d21e4..a1398b8 100644 --- a/src/script.js +++ b/src/script.js @@ -1,4 +1,3 @@ -var assert = require('assert') var bufferutils = require('./bufferutils') var crypto = require('./crypto') var typeforce = require('typeforce') @@ -93,7 +92,7 @@ Script.fromChunks = function (chunks) { } }) - assert.equal(offset, buffer.length, 'Could not decode chunks') + if (offset !== buffer.length) throw new Error('Could not decode chunks') return new Script(buffer, chunks) }