peer: refactor cmpctblock handling.
This commit is contained in:
parent
aba22e24d7
commit
d96a579665
@ -2181,12 +2181,9 @@ Peer.prototype._handleCmpctBlock = co(function* _handleCmpctBlock(packet) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.compactBlocks[hash] = block;
|
||||
|
||||
result = block.fillMempool(this.options.witness, this.mempool);
|
||||
|
||||
if (result) {
|
||||
delete this.compactBlocks[hash];
|
||||
this.fire('block', block.toBlock());
|
||||
this.logger.debug(
|
||||
'Received full compact block %s (%s).',
|
||||
@ -2194,6 +2191,8 @@ Peer.prototype._handleCmpctBlock = co(function* _handleCmpctBlock(packet) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.compactBlocks[hash] = block;
|
||||
|
||||
yield this.send(new packets.GetBlockTxnPacket(block.toRequest()));
|
||||
|
||||
this.logger.debug(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user