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) {
|
if (entry.chainwork.cmp(this.tip.chainwork) <= 0) {
|
||||||
// Save block to an alternate chain.
|
// Save block to an alternate chain.
|
||||||
yield this.saveAlternate(entry, block, prev, flags);
|
yield this.saveAlternate(entry, block, prev, flags);
|
||||||
|
|
||||||
if (!initial)
|
|
||||||
this.emit('competitor resolved', block, entry);
|
|
||||||
} else {
|
} else {
|
||||||
// Attempt to add block to the chain index.
|
// Attempt to add block to the chain index.
|
||||||
yield this.setBestChain(entry, block, prev, flags);
|
yield this.setBestChain(entry, block, prev, flags);
|
||||||
|
}
|
||||||
|
|
||||||
if (!initial) {
|
// Emit the resolved orphan.
|
||||||
this.logger.debug('Orphan %s (%d) was resolved.',
|
if (!initial) {
|
||||||
block.rhash(), entry.height);
|
this.logger.debug(
|
||||||
this.emit('resolved', block, entry);
|
'Orphan block was resolved: %s (%d).',
|
||||||
}
|
block.rhash(), entry.height);
|
||||||
|
this.emit('resolved', block, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep track of stats.
|
// Keep track of stats.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user