Skip to content

Commit

Permalink
decrease waiting time
Browse files Browse the repository at this point in the history
  • Loading branch information
louisinger committed Nov 5, 2024
1 parent 04e57f8 commit cdb4e17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/internal/core/application/covenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (s *covenantService) startRound() {
s.currentRound = round

defer func() {
time.Sleep(time.Duration(s.roundInterval/2) * time.Second)
time.Sleep(time.Duration(s.roundInterval/3) * time.Second)
s.startFinalization()
}()

Expand All @@ -469,7 +469,7 @@ func (s *covenantService) startFinalization() {
s.startRound()
return
}
time.Sleep(time.Duration((s.roundInterval/2)-1) * time.Second)
time.Sleep(time.Duration((s.roundInterval/3)-1) * time.Second)
s.finalizeRound()
}()

Expand Down
4 changes: 2 additions & 2 deletions server/internal/core/application/covenantless.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func (s *covenantlessService) startRound() {
s.currentRound = round

defer func() {
time.Sleep(time.Duration(s.roundInterval/2) * time.Second)
time.Sleep(time.Duration(s.roundInterval/3) * time.Second)
s.startFinalization()
}()

Expand All @@ -738,7 +738,7 @@ func (s *covenantlessService) startFinalization() {
ctx := context.Background()
round := s.currentRound

roundRemainingDuration := time.Duration(s.roundInterval/2-1) * time.Second
roundRemainingDuration := time.Duration(s.roundInterval/3-1) * time.Second
thirdOfRemainingDuration := time.Duration(roundRemainingDuration / 3)

var roundAborted bool
Expand Down

0 comments on commit cdb4e17

Please sign in to comment.