Script: remove use of assert
This commit is contained in:
parent
395c43ad74
commit
1d4a71852f
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue