forked from OffchainLabs/nitro
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a log helper that will log only after a certain of time or retries and utilize the emphemeral error handler in batch poster
- Loading branch information
1 parent
d683e16
commit bf4e0c8
Showing
3 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package arbnode | ||
|
||
import ( | ||
"time" | ||
|
||
log_helper "github.com/EspressoSystems/espresso-sequencer-go/log-helper" | ||
) | ||
|
||
const FETCH_MERKLE_ROOT = "espresso-fetch-merkle-root" | ||
const ESPRESSO_VERIFICATION = "espresso-verification" | ||
|
||
var logger = log_helper.NewLogger() | ||
|
||
func init() { | ||
// An error log will occur if more than an hour has passed since the first attempt | ||
logger.AddLogAfterDurationStrategy(FETCH_MERKLE_ROOT, "0", time.Hour) | ||
logger.AddLogAfterDurationStrategy(ESPRESSO_VERIFICATION, "0", time.Hour) | ||
} |
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