fix parse error. misc.
This commit is contained in:
parent
ab8fff71e2
commit
87a94639d4
@ -155,6 +155,7 @@ Chain.prototype._init = function _init() {
|
|||||||
|
|
||||||
this.on('exists', function(block, height) {
|
this.on('exists', function(block, height) {
|
||||||
bcoin.debug('Already have block %s (%d).', block.rhash, height);
|
bcoin.debug('Already have block %s (%d).', block.rhash, height);
|
||||||
|
});
|
||||||
|
|
||||||
this.on('orphan', function(block, height) {
|
this.on('orphan', function(block, height) {
|
||||||
bcoin.debug('Handled orphan %s (%d).', block.rhash, height);
|
bcoin.debug('Handled orphan %s (%d).', block.rhash, height);
|
||||||
|
|||||||
@ -460,7 +460,8 @@ MinerBlock.prototype.updateCommitment = function updateCommitment() {
|
|||||||
hash = this.block.getCommitmentHash();
|
hash = this.block.getCommitmentHash();
|
||||||
|
|
||||||
// Update commitment.
|
// Update commitment.
|
||||||
output.script = bcoin.script.fromCommitment(hash, flags);
|
output.script.clear();
|
||||||
|
output.script.fromCommitment(hash, flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2555,6 +2555,7 @@ Script.prototype.fromMultisig = function fromMultisig(m, n, keys) {
|
|||||||
|
|
||||||
this.push(n + 0x50);
|
this.push(n + 0x50);
|
||||||
this.push(opcodes.OP_CHECKMULTISIG);
|
this.push(opcodes.OP_CHECKMULTISIG);
|
||||||
|
|
||||||
this.compile();
|
this.compile();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@ -2692,14 +2693,7 @@ Script.fromAddress = function fromAddress(address) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Script.prototype.fromCommitment = function fromCommitment(hash, flags) {
|
Script.prototype.fromCommitment = function fromCommitment(hash, flags) {
|
||||||
var p;
|
var p = new BufferWriter();
|
||||||
|
|
||||||
if (typeof flags === 'string')
|
|
||||||
flags = new Buffer(flags, 'utf8');
|
|
||||||
|
|
||||||
assert(!flags || Buffer.isBuffer(flags));
|
|
||||||
|
|
||||||
p = new BufferWriter();
|
|
||||||
p.writeU32BE(0xaa21a9ed);
|
p.writeU32BE(0xaa21a9ed);
|
||||||
p.writeHash(hash);
|
p.writeHash(hash);
|
||||||
|
|
||||||
@ -4656,7 +4650,7 @@ Opcode.prototype.toRaw = function toRaw(writer) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiate an opcode from a number.
|
* Instantiate an opcode from a number opcode.
|
||||||
* @param {Number} op
|
* @param {Number} op
|
||||||
* @returns {Opcode}
|
* @returns {Opcode}
|
||||||
*/
|
*/
|
||||||
@ -4721,6 +4715,17 @@ Opcode.fromNumber = function fromNumber(num) {
|
|||||||
return Opcode.fromData(Script.array(num));
|
return Opcode.fromData(Script.array(num));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiate an opcode from a small number.
|
||||||
|
* @param {Number} num
|
||||||
|
* @returns {Opcode}
|
||||||
|
*/
|
||||||
|
|
||||||
|
Opcode.fromSmall = function fromSmall(num) {
|
||||||
|
assert(utils.isNumber(num) && num >= 0 && num <= 16);
|
||||||
|
return new Opcode(num === 0 ? 0 : num + 0x50);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiate a pushdata opcode from a string.
|
* Instantiate a pushdata opcode from a string.
|
||||||
* @param {String} data
|
* @param {String} data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user