Script: remove use of assert

This commit is contained in:
Daniel Cousens 2015-08-11 17:05:27 +10:00
parent 395c43ad74
commit 1d4a71852f

View file

@ -1,4 +1,3 @@
var assert = require('assert')
var bufferutils = require('./bufferutils') var bufferutils = require('./bufferutils')
var crypto = require('./crypto') var crypto = require('./crypto')
var typeforce = require('typeforce') 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) return new Script(buffer, chunks)
} }