diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index e96e3c33..b6032e0a 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -486,7 +486,7 @@ Mempool.prototype.verify = function verify(tx, callback) { fee = tx.getFee(); minFee = tx.getMinFee(); if (fee.cmp(minFee) < 0) { - if (self.relayPriority && fee.cmpn(0) === 0) { + if (self.relayPriority) { free = tx.isFree(height); if (!free) { return callback(new VerifyError(tx, diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index fab7a3d2..0c9eefff 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -896,25 +896,25 @@ Pool.prototype._handleTX = function _handleTX(tx, peer, callback) { requested = this.fulfill(tx); updated = this.markTX(tx, 1); - function addMempool(tx, peer, callback) { + function addMempool(tx, callback) { if (!self.mempool) return callback(); if (tx.ts !== 0) return callback(); - self.mempool.addTX(tx, peer, callback); + self.mempool.addTX(tx, callback); } this._prehandleTX(tx, peer, function(err) { if (err) return callback(err); - addMempool(tx, peer, function(err) { + addMempool(tx, function(err) { if (err) { if (err.type === 'VerifyError') { if (err.score >= 0) - peer.sendReject(block, err.code, err.reason, err.score); + peer.sendReject(tx, err.code, err.reason, err.score); return callback(); } } diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index b94d0dfc..de25f8e3 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -2358,7 +2358,7 @@ Script.prototype.getSigops = function getSigops(accurate) { total++; } else if (op === opcodes.OP_CHECKMULTISIG || op === opcodes.OP_CHECKMULTISIGVERIFY) { if (accurate && lastOp >= opcodes.OP_1 && lastOp <= opcodes.OP_16) - total += lastOp; + total += lastOp - 0x50; else total += constants.script.maxPubkeysPerMultisig; } diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index e47ec1ed..10451d1c 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -1137,6 +1137,7 @@ TX.prototype.inspect = function inspect() { height: this.height, value: utils.btc(this.getValue()), fee: utils.btc(this.getFee()), + minFee: utils.btc(this.getMinFee()), confirmations: this.getConfirmations(), priority: this.getPriority().toString(10), date: new Date(this.ts * 1000).toISOString(),