diff --git a/lib/mining/miner.js b/lib/mining/miner.js index 89e03fa8..fb91cda3 100644 --- a/lib/mining/miner.js +++ b/lib/mining/miner.js @@ -309,6 +309,13 @@ Miner.prototype._createBlock = co(function* createBlock(tip, address) { this.build(attempt); + this.logger.debug( + 'Created miner block (height=%d, weight=%d, fees=%d, txs=%s).', + attempt.height, + attempt.weight, + Amount.btc(attempt.fees), + attempt.items.length + 1); + return attempt; }); @@ -471,13 +478,6 @@ Miner.prototype.build = function build(attempt) { attempt.refresh(); - this.logger.debug( - 'Created miner block (height=%d, weight=%d, fees=%d, txs=%s).', - attempt.height, - attempt.weight, - Amount.btc(attempt.fees), - attempt.items.length + 1); - assert(block.getWeight() <= attempt.weight, 'Block exceeds reserved weight!'); assert(block.getBaseSize() <= consensus.MAX_BLOCK_SIZE,