Commit 1812f168 authored by refcell's avatar refcell Committed by GitHub

fix(op-dispute-mon): Unresolved Claim Logging (#10394)

* fix(op-dispute-mon): unresolved claim logging

* fix(op-dispute-mon): lints

* fix(op-dispute-mon): unresolved claim logging

* fix(op-dispute-mon): move resolution response buffer to a constant
parent fc458665
......@@ -10,6 +10,8 @@ import (
"github.com/ethereum/go-ethereum/log"
)
const MaximumResolutionResponseBuffer = time.Minute
type RClock interface {
Now() time.Time
}
......@@ -117,7 +119,11 @@ func (c *ClaimMonitor) checkGameClaims(
}
} else {
if clockExpired {
c.logger.Warn("Claim unresolved after clock expiration", "game", game.Proxy, "claimContractIndex", claim.ContractIndex)
// SAFETY: accumulatedTime must be larger than or equal to maxChessTime since clockExpired
overflow := accumulatedTime - maxChessTime
if overflow >= MaximumResolutionResponseBuffer {
c.logger.Warn("Claim unresolved after clock expiration", "game", game.Proxy, "claimContractIndex", claim.ContractIndex, "delay", overflow)
}
if firstHalf {
claimStatus[metrics.FirstHalfExpiredUnresolved]++
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment