fix/update logger warning and fix incorrect assert usage
This commit is contained in:
parent
9f9c536efc
commit
11534032f4
@ -969,11 +969,13 @@ class Chain extends AsyncEmitter {
|
|||||||
if (tip.height - fork.height >= this.network.nlrLimit) {
|
if (tip.height - fork.height >= this.network.nlrLimit) {
|
||||||
if (this.network.nlrLimit !== 0) {
|
if (this.network.nlrLimit !== 0) {
|
||||||
this.logger.warning(
|
this.logger.warning(
|
||||||
'NLR Activated: current=%h(%d) fork=%h(%d) reorg_size=%d',
|
'NLR Activated. Preventing reorganization: current=%h(%d) competitor=%h(%d) fork=%h(%d) reorg_size=%d',
|
||||||
tip.hash,
|
tip.hash,
|
||||||
tip.height,
|
tip.height,
|
||||||
competitor.hash,
|
competitor.hash,
|
||||||
competitor.height,
|
competitor.height,
|
||||||
|
fork.hash,
|
||||||
|
fork.height,
|
||||||
tip.height - fork.height
|
tip.height - fork.height
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -988,7 +990,7 @@ class Chain extends AsyncEmitter {
|
|||||||
await this.invalidate(previous.hash)
|
await this.invalidate(previous.hash)
|
||||||
|
|
||||||
// check
|
// check
|
||||||
assert(this.getPrevious(previous), fork)
|
assert.equal(this.getPrevious(previous), fork, 'nlr invalidation down to the fork')
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user