Skip to content

feat(provider): add default timeout for PendingTransactionConfig#3771

Open
TanayK07 wants to merge 3 commits intoalloy-rs:mainfrom
TanayK07:feat/pending-tx-default-timeout
Open

feat(provider): add default timeout for PendingTransactionConfig#3771
TanayK07 wants to merge 3 commits intoalloy-rs:mainfrom
TanayK07:feat/pending-tx-default-timeout

Conversation

@TanayK07
Copy link
Copy Markdown
Contributor

@TanayK07 TanayK07 commented Mar 3, 2026

Summary

  • Adds DEFAULT_PENDING_TX_TIMEOUT constant (5 minutes) as the default timeout for PendingTransactionConfig
  • Changes PendingTransactionConfig::new() to use Some(DEFAULT_PENDING_TX_TIMEOUT) instead of None
  • Users can still disable the timeout with .with_timeout(None)

Previously, PendingTransactionConfig defaulted to timeout: None, meaning pending transaction watchers could hang indefinitely if a transaction was never confirmed. This sets a reasonable default while preserving the ability to opt out.

Closes #3104

Test plan

  • cargo build -p alloy-provider passes
  • cargo clippy -p alloy-provider clean (no warnings)
  • cargo fmt --check passes
  • CI tests

Set DEFAULT_PENDING_TX_TIMEOUT (5 minutes) as the default timeout for
pending transaction watchers instead of None, preventing calls from
hanging indefinitely when a transaction is never confirmed.

Users can still disable the timeout with `.with_timeout(None)`.

Closes alloy-rs#3104
@TanayK07
Copy link
Copy Markdown
Contributor Author

hi @mattsse could you review this once when you get the chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Feature] PendingTransactionConfig should have a default timeout

1 participant