Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhen1997 committed Aug 27, 2024
1 parent d71e9d2 commit aa7f9e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/txmgr/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,12 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) hand
case client.Underpriced:
return eb.tryAgainBumpingGas(ctx, lgr, err, etx, attempt, initialBroadcastAt, retryCount+1)
case client.InsufficientFunds:
// NOTE: This can potentially happen during gas spike. We want to re-estimate the tx, and save the replaced attempt and process it after the back off,
// so tryAgainWithNewEstimation should return retryable after saved the tx attempt, instead of calling handleInProgressTx() again
// NOTE:
// This can potentially happen during gas spike.
// We want to re-estimate the tx, and save the replaced attempt,
// and process it after the back off duration.
// This is done by tryAgainWithNewEstimation return retryable after saved the tx attempt,
// instead of calling handleInProgressTx() again
eb.SvcErrBuffer.Append(err)
return eb.tryAgainWithNewEstimation(ctx, lgr, err, errType, etx, attempt, initialBroadcastAt)
case client.Retryable:
Expand Down

0 comments on commit aa7f9e2

Please sign in to comment.