Skip to content

Commit ef86b8a

Browse files
authored
Alert on older-than-head failures (#659)
1 parent c3d9543 commit ef86b8a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

alertmanager/alerts.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,12 @@ func wdPostCheck(al *alerts) {
443443
return
444444
}
445445

446-
h := head
446+
// Start from the newest finalized tipset.
447+
h, err := al.api.ChainGetTipSet(al.ctx, head.Parents())
448+
if err != nil {
449+
al.alertMap[Name].err = err
450+
return
451+
}
447452

448453
// Map[Miner Address]Map[DeadlineIdx][]Partitions
449454
msgCheck := make(map[address.Address]map[uint64][]bool)

0 commit comments

Comments
 (0)