mempool: logs.

This commit is contained in:
Christopher Jeffrey 2016-07-25 14:43:16 -07:00
parent e3389ac28b
commit 1356a3c7ab
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -836,7 +836,7 @@ Mempool.prototype.addUnchecked = function addUnchecked(entry, callback, force) {
if (self.fees)
self.fees.processTX(entry, self.chain.isFull());
self.logger.debug('Added tx %s to the mempool.', entry.tx.rhash);
self.logger.debug('Added tx %s to mempool.', entry.tx.rhash);
resolved = self.resolveOrphans(entry.tx);
@ -905,12 +905,15 @@ Mempool.prototype.removeUnchecked = function removeUnchecked(entry, limit, callb
self.fees.removeTX(hash);
if (limit) {
self.logger.debug('Removed tx %s from mempool.', entry.tx.rhash);
rate = bcoin.tx.getRate(entry.sizes, entry.fees);
rate += self.minReasonableFee;
if (rate > self.minFeeRate) {
self.minFeeRate = rate;
self.blockSinceBump = false;
}
} else {
self.logger.debug('Removed block tx %s from mempool.', entry.tx.rhash);
}
self.emit('remove tx', entry.tx);