Skip to content

Commit 8f55bdc

Browse files
committed
send alert zero_block_created every 3 hours
1 parent 2bfb150 commit 8f55bdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/alert_bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def init_alerts():
7676
),
7777
"zero_block_created": Alert(
7878
"critical",
79-
f"Validator has not created any blocks in the {int(VALIDATION_PERIOD // 3 // 3600)} hours",
79+
f"Validator has not created any blocks in the {int(VALIDATION_PERIOD // 6 // 3600)} hours",
8080
"Validator has not created any blocks in the last {hours} hours.",
81-
VALIDATION_PERIOD // 3
81+
VALIDATION_PERIOD // 6
8282
),
8383
"validator_slashed": Alert(
8484
"high",
@@ -341,7 +341,7 @@ def check_zero_blocks_created(self):
341341
if not self.ton.using_validator():
342342
return
343343
ts = get_timestamp()
344-
period = VALIDATION_PERIOD // 3 # 6h for mainnet, 40m for testnet
344+
period = VALIDATION_PERIOD // 6 # 3h for mainnet, 40m for testnet
345345
start, end = ts - period, ts - 60
346346
config34 = self.ton.GetConfig34()
347347
if start < config34.startWorkTime: # round started recently

0 commit comments

Comments
 (0)