Skip to content

Commit

Permalink
check every block
Browse files Browse the repository at this point in the history
  • Loading branch information
gadost committed Feb 10, 2022
1 parent 82a5c85 commit 5110162
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion watcher/network_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,17 @@ func Scan(n int, chainName string, v *ValidatorInfo) {
}

}
time.Sleep(10 * time.Second)
for i := 0; i >= 0; i++ {
lb, err := client.ABCIInfo(ctx)
if err == nil {
if lb.Response.LastBlockHeight > v.Validators[0].Participation.CheckedBlock {
v.Validators[0].Participation.CheckedBlock = lb.Response.LastBlockHeight
i = -2
} else {
time.Sleep(1 * time.Second)
}
}
}
}

}

0 comments on commit 5110162

Please sign in to comment.