From 18d488b4319536ac748a7d2316f5cca72005f0ee Mon Sep 17 00:00:00 2001 From: Long Zhang Date: Fri, 31 Oct 2025 19:07:14 +0100 Subject: [PATCH] reset statConsecutiveMiss when it is configured to exclude preactions Signed-off-by: Long Zhang --- td2/ws.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td2/ws.go b/td2/ws.go index 1883f54..0808b45 100644 --- a/td2/ws.go +++ b/td2/ws.go @@ -145,12 +145,16 @@ func (cc *ChainConfig) WsRun() { cc.statTotalMiss += 1 if !excludePreactions { cc.statConsecutiveMiss += 1 + } else { + cc.statConsecutiveMiss = 0 } case StatusPrevote: cc.statPrevoteMiss += 1 cc.statTotalMiss += 1 if !excludePreactions { cc.statConsecutiveMiss += 1 + } else { + cc.statConsecutiveMiss = 0 } case StatusSigned: cc.statTotalSigns += 1