fix minimal check. small ints.
This commit is contained in:
parent
4e80320953
commit
b59f6ae384
@ -2548,12 +2548,12 @@ Script.prototype.fromMultisig = function fromMultisig(m, n, keys) {
|
||||
|
||||
keys = utils.sortKeys(keys);
|
||||
|
||||
this.push(m + 0x50);
|
||||
this.push(Opcode.fromSmall(m));
|
||||
|
||||
for (i = 0; i < keys.length; i++)
|
||||
this.push(keys[i]);
|
||||
|
||||
this.push(n + 0x50);
|
||||
this.push(Opcode.fromSmall(n));
|
||||
this.push(opcodes.OP_CHECKMULTISIG);
|
||||
|
||||
this.compile();
|
||||
@ -2633,7 +2633,7 @@ Script.fromNulldata = function fromNulldata(flags) {
|
||||
Script.prototype.fromProgram = function fromProgram(version, data) {
|
||||
assert(utils.isNumber(version) && version >= 0 && version <= 16);
|
||||
assert(Buffer.isBuffer(data) && data.length >= 2 && data.length <= 40);
|
||||
this.push(version === 0 ? 0 : version + 0x50);
|
||||
this.push(Opcode.fromSmall(version));
|
||||
this.push(data);
|
||||
this.compile();
|
||||
return this;
|
||||
@ -2850,7 +2850,7 @@ Script.prototype.isPubkey = function isPubkey(minimal) {
|
||||
*/
|
||||
|
||||
Script.prototype.isPubkeyhash = function isPubkeyhash(minimal) {
|
||||
if (!minimal) {
|
||||
if (minimal) {
|
||||
return this.raw.length === 25
|
||||
&& this.raw[0] === opcodes.OP_DUP
|
||||
&& this.raw[1] === opcodes.OP_HASH160
|
||||
|
||||
Loading…
Reference in New Issue
Block a user