Skip to content

Commit c8aecf5

Browse files
committed
refactor: reduced number of retry attempts
1 parent 48dcfed commit c8aecf5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/vote.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ func (*UtilsStruct) HandleBlock(client *ethclient.Client, account types.Account,
201201
log.Error("Error in getting remaining time of the current state: ", err)
202202
return
203203
}
204+
if remainingTimeOfTheCurrentState <= 0 {
205+
return
206+
}
204207

205208
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(remainingTimeOfTheCurrentState)*time.Second)
206209
defer cancel()

core/constants.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ const (
1717
// ChainId corresponds to the EUROPA chain
1818
var ChainId = big.NewInt(0x79f99296)
1919

20-
const (
21-
MaxRetries uint = 3
22-
RetryDelayDuration int64 = 1
23-
)
20+
const MaxRetries uint = 4
2421

2522
var NilHash = common.Hash{0x00}
2623

0 commit comments

Comments
 (0)