Skip to content

Commit

Permalink
Waiting for blocks to load
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Feb 28, 2024
1 parent 1ad10d6 commit 30c16b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/ordering/cosipbft/cosipbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,15 @@ func NewServiceStart(s *Service) {
close(s.started)
if s.syncMethod() == syncMethodFast {
go func() {
time.Sleep(10 * time.Second)
s.logger.Info().Msg("Waiting for blocks to load")
for {
blocks := s.blocks.Len()
time.Sleep(10 * time.Second)
s.logger.Info().Msgf("Blocks changed from %d to %d", blocks, s.blocks.Len())
if blocks == s.blocks.Len() {
break
}
}
roster, err := s.getCurrentRoster()
if err != nil {
s.logger.Err(err).Msg("Couldn't get roster")
Expand Down

0 comments on commit 30c16b1

Please sign in to comment.