Skip to content

Commit

Permalink
Fix for batches in heartbeats tool
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Aug 26, 2024
1 parent 445fe3e commit cc55e94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fly/cmd/heartbeats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,13 @@ func main() {
}
gossipLock.Unlock()
case batch := <-batchObsvC:
addr := "0x" + string(hex.EncodeToString(batch.Msg.Addr))
idx := guardianIndexMap[strings.ToLower(addr)]
gossipCounter[idx][GSM_signedObservationBatch]++
gossipCounter[totalsRow][GSM_signedObservationBatch]++
for _, o := range batch.Msg.Observations {
spl := strings.Split(o.MessageId, "/")
emitter := strings.ToLower(spl[1])
addr := "0x" + string(hex.EncodeToString(batch.Msg.Addr))
idx := guardianIndexMap[strings.ToLower(addr)]
if knownEmitters[emitter] {
gossipCounter[idx][GSM_tbObservation]++
gossipCounter[totalsRow][GSM_tbObservation]++
Expand Down

0 comments on commit cc55e94

Please sign in to comment.