Skip to content

Commit

Permalink
refactor: reduced number of retry attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Sep 12, 2024
1 parent 427320a commit 02e45ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ func (*UtilsStruct) HandleBlock(client *ethclient.Client, account types.Account,
log.Error("Error in getting remaining time of the current state: ", err)
return
}
if remainingTimeOfTheCurrentState <= 0 {
return
}

ctx, cancel := context.WithTimeout(context.Background(), time.Duration(remainingTimeOfTheCurrentState)*time.Second)
defer cancel()
Expand Down
2 changes: 1 addition & 1 deletion core/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// ChainId corresponds to the EUROPA chain
var ChainId = big.NewInt(0x79f99296)

const MaxRetries uint = 8
const MaxRetries uint = 4

var NilHash = common.Hash{0x00}

Expand Down

0 comments on commit 02e45ca

Please sign in to comment.