peer: compact block logs.

This commit is contained in:
Christopher Jeffrey 2016-07-25 00:13:30 -07:00
parent c9e8f779f3
commit b860894471
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1876,11 +1876,18 @@ Peer.prototype._handleCmpctBlock = function _handleCmpctBlock(block) {
if (result) {
delete self.compactBlocks[hash];
self.emit('block', block.toBlock());
self.logger.debug(
'Received full compact block %s (%s).',
block.rhash, self.hostname);
return;
}
self.write(self.framer.getBlockTxn(block.toRequest()));
self.logger.debug(
'Received semi-full compact block %s (%s).',
block.rhash, self.hostname);
block.startTimeout(10000, function() {
self.logger.debug(
'Compact block timed out: %s (%s).',
@ -1969,6 +1976,10 @@ Peer.prototype._handleBlockTxn = function _handleBlockTxn(payload) {
return;
}
this.logger.debug(
'Filled compact block %s (%s).',
block.rhash, this.hostname);
this.emit('block', block.toBlock());
};