chain: minor. logging.
This commit is contained in:
parent
a96868ff8e
commit
1a5263ef23
@ -1274,18 +1274,17 @@ Chain.prototype._add = co(function* add(block, flags) {
|
||||
if (entry.chainwork.cmp(this.tip.chainwork) <= 0) {
|
||||
// Save block to an alternate chain.
|
||||
yield this.saveAlternate(entry, block, prev, flags);
|
||||
|
||||
if (!initial)
|
||||
this.emit('competitor resolved', block, entry);
|
||||
} else {
|
||||
// Attempt to add block to the chain index.
|
||||
yield this.setBestChain(entry, block, prev, flags);
|
||||
}
|
||||
|
||||
if (!initial) {
|
||||
this.logger.debug('Orphan %s (%d) was resolved.',
|
||||
block.rhash(), entry.height);
|
||||
this.emit('resolved', block, entry);
|
||||
}
|
||||
// Emit the resolved orphan.
|
||||
if (!initial) {
|
||||
this.logger.debug(
|
||||
'Orphan block was resolved: %s (%d).',
|
||||
block.rhash(), entry.height);
|
||||
this.emit('resolved', block, entry);
|
||||
}
|
||||
|
||||
// Keep track of stats.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user