all: Expected T, got PARAM
This commit is contained in:
parent
14069155b0
commit
6f3d829be0
2 changed files with 5 additions and 5 deletions
|
@ -10,10 +10,10 @@ var sec = require('./sec')
|
|||
var ecparams = sec('secp256k1')
|
||||
|
||||
function ECPubKey(Q, compressed) {
|
||||
assert(Q instanceof ECPointFp, 'Q must be an ECPointFP')
|
||||
assert(Q instanceof ECPointFp, 'Expected ECPointFP, got ' + Q)
|
||||
|
||||
if (compressed == undefined) compressed = true
|
||||
assert.strictEqual(typeof compressed, 'boolean', 'Invalid compression flag')
|
||||
assert.strictEqual(typeof compressed, 'boolean', 'Expected boolean, got ' + compressed)
|
||||
|
||||
this.compressed = compressed
|
||||
this.Q = Q
|
||||
|
|
|
@ -247,7 +247,7 @@ Script.prototype.writeOp = function(opcode) {
|
|||
Script.prototype.writeBytes = function(data) {
|
||||
// FIXME: Script module doesn't support buffers yet
|
||||
if (Buffer.isBuffer(data)) data = Array.prototype.slice.call(data);
|
||||
assert(Array.isArray(data), "Expected a byte array. Got " + data)
|
||||
assert(Array.isArray(data), 'Expected a byte array, got ' + data)
|
||||
|
||||
if (data.length < opcodes.OP_PUSHDATA1) {
|
||||
this.buffer.push(data.length)
|
||||
|
@ -305,7 +305,7 @@ Script.createP2SHScriptPubKey = function(hash) {
|
|||
|
||||
// m [pubKeys ...] n OP_CHECKMULTISIG
|
||||
Script.createMultisigScriptPubKey = function(m, pubKeys) {
|
||||
assert(Array.isArray(pubKeys), 'Expected Array, got: ' + pubKeys)
|
||||
assert(Array.isArray(pubKeys), 'Expected Array, got ' + pubKeys)
|
||||
assert(pubKeys.length >= m, 'Not enough pubKeys provided')
|
||||
var script = new Script()
|
||||
var n = pubKeys.length
|
||||
|
@ -369,7 +369,7 @@ Script.prototype.clone = function() {
|
|||
}
|
||||
|
||||
Script.fromChunks = function(chunks) {
|
||||
assert(Array.isArray(chunks), 'Expected Array, got: ' + chunks)
|
||||
assert(Array.isArray(chunks), 'Expected Array, got ' + chunks)
|
||||
|
||||
var bufferSize = chunks.reduce(function(accum, chunk) {
|
||||
var chunkSize = 1
|
||||
|
|
Loading…
Add table
Reference in a new issue