Skip to content

Commit c569ce8

Browse files
committed
adding PR feedback
1 parent 0eb6ca4 commit c569ce8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/services/relay/evm/evm_service.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (r *Relayer) SubmitTransaction(ctx context.Context, txRequest evmtypes.Subm
171171

172172
_, err = r.chain.TxManager().CreateTransaction(ctx, txmReq)
173173
if err != nil {
174-
return nil, err
174+
return nil, fmt.Errorf("%w; failed to create tx", err)
175175
}
176176

177177

@@ -194,14 +194,10 @@ func (r *Relayer) SubmitTransaction(ctx context.Context, txRequest evmtypes.Subm
194194
if time.Since(start) > maximumWaitTimeForConfirmation {
195195
return nil, errors.Errorf("Wait time for Tx %s to get confirmed was greater than maximum wait time %d", txID, maximumWaitTimeForConfirmation)
196196
}
197-
//PLEX-1524 - Use ticker instead of time.Sleep
197+
//PLEX-1524 - Use ticker instead of time.Sleep and make the time configurable
198198
time.Sleep(100 * time.Millisecond)
199199
}
200200

201-
if err != nil {
202-
return nil, fmt.Errorf("%w; failed to create tx", err)
203-
}
204-
205201
receipt, err := r.chain.TxManager().GetTransactionReceipt(ctx, txID)
206202
if err != nil {
207203
return nil, fmt.Errorf("%w; failed to get TX receipt for tx with ID %s", err, txID)

0 commit comments

Comments
 (0)