forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
op-challenger: Fix highest acted L1 block metric for completed games (e…
…thereum-optimism#10549) * op-challenger: Fix highest acted L1 block metric for completed games Adds an e2e test to prove it really does work. * op-challenger: Add more context to comment.
- Loading branch information
Showing
9 changed files
with
126 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package challenger | ||
|
||
import ( | ||
"sync/atomic" | ||
|
||
"github.com/ethereum-optimism/optimism/op-challenger/metrics" | ||
) | ||
|
||
type CapturingMetrics struct { | ||
metrics.NoopMetricsImpl | ||
|
||
HighestActedL1Block atomic.Uint64 | ||
} | ||
|
||
func NewCapturingMetrics() *CapturingMetrics { | ||
return &CapturingMetrics{} | ||
} | ||
|
||
var _ metrics.Metricer = (*CapturingMetrics)(nil) | ||
|
||
func (c *CapturingMetrics) RecordActedL1Block(block uint64) { | ||
c.HighestActedL1Block.Store(block) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters