ensures that pubKey length is greater than m
ensure that pubKey length is greater than m use Array.isArray over instanceof error message
This commit is contained in:
parent
4dd617d5ca
commit
343289229e
2 changed files with 6 additions and 0 deletions
src
|
@ -304,6 +304,8 @@ Script.createP2SHScriptPubKey = function(hash) {
|
|||
|
||||
// m [pubKeys ...] n OP_CHECKMULTISIG
|
||||
Script.createMultisigScriptPubKey = function(m, 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue