Skip to content

Commit

Permalink
Merge f0640a4 into 966c88f
Browse files Browse the repository at this point in the history
  • Loading branch information
adjoinant committed Sep 17, 2015
2 parents 966c88f + f0640a4 commit e9f4a17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/script/script.js
Expand Up @@ -388,7 +388,7 @@ Script.prototype.isScriptHashOut = function() {
buf[buf.length - 1] === Opcode.OP_EQUAL);
};

/**
/**
* @returns {boolean} if this is a p2sh input script
* Note that these are frequently indistinguishable from pubkeyhashin
*/
Expand Down Expand Up @@ -438,7 +438,7 @@ Script.prototype.isMultisigIn = function() {
this.chunks.slice(1, this.chunks.length).every(function(obj) {
return obj.buf &&
BufferUtil.isBuffer(obj.buf) &&
obj.buf.length === 0x47;
Signature.isTxDER(obj.buf);
});
};

Expand Down
2 changes: 1 addition & 1 deletion test/script/script.js
Expand Up @@ -347,7 +347,7 @@ describe('Script', function() {
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01').isMultisigIn().should.equal(true);
});
it('should identify multisig in 2', function() {
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 0x47 30450220357011fd3b3ad2b8f2f2d01e05dc6108b51d2a245b4ef40c112d6004596f0475022100a8208c93a39e0c366b983f9a80bfaf89237fcd64ca543568badd2d18ee2e1d7501').isMultisigIn().should.equal(true);
Script('OP_0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 0x49 0x30450220357011fd3b3ad2b8f2f2d01e05dc6108b51d2a245b4ef40c112d6004596f0475022100a8208c93a39e0c366b983f9a80bfaf89237fcd64ca543568badd2d18ee2e1d7501').isMultisigIn().should.equal(true);
});
it('should identify non-multisig in 1', function() {
Script('0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01').isMultisigIn().should.equal(false);
Expand Down

0 comments on commit e9f4a17

Please sign in to comment.