Skip to content

Commit

Permalink
Merge branch 'main' into tt_1619_more_robust_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Sep 6, 2024
2 parents c619dd9 + d6bb3c8 commit af27187
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions seth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ func (m *Client) WaitMined(ctx context.Context, l zerolog.Logger, b bind.DeployB
return receipt, nil
} else if errors.Is(err, ethereum.NotFound) {
l.Debug().
Str("Timeout", m.Cfg.Network.TxnTimeout.String()).
Str("TX", tx.Hash().String()).
Msg("Awaiting transaction")
} else {
Expand Down
2 changes: 1 addition & 1 deletion seth/client_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewClientBuilder() *ClientBuilder {
BlockStatsConfig: &BlockStatsConfig{RPCRateLimit: 10},
NonceManager: &NonceManagerCfg{KeySyncRateLimitSec: 10, KeySyncRetries: 3, KeySyncTimeout: MustMakeDuration(60 * time.Second), KeySyncRetryDelay: MustMakeDuration(5 * time.Second)},
GasBump: &GasBumpConfig{
Retries: 10,
Retries: 0, // bumping disabled by default
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions seth/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ var prepareReplacementTransaction = func(client *Client, tx *types.Transaction)
ctxPending, cancelPending := context.WithTimeout(context.Background(), client.Cfg.Network.TxnTimeout.Duration())
_, isPending, err := client.Client.TransactionByHash(ctxPending, tx.Hash())
defer cancelPending()
if err != nil {
if err != nil && !strings.Contains(err.Error(), "not found") {
return nil, err
}

if !isPending {
if err != nil && !isPending {
L.Debug().Str("Tx hash", tx.Hash().Hex()).Msg("Transaction was confirmed before bumping gas")
return nil, errors.New("transaction was confirmed before bumping gas")
}
Expand Down

0 comments on commit af27187

Please sign in to comment.