Skip to content

fix: add websocket fallback for pending transactions when filter is unsupported#2281

Open
Dev10-sys wants to merge 2 commits intoLFDT-web3j:mainfrom
Dev10-sys:fix/pending-tx-websocket-fallback
Open

fix: add websocket fallback for pending transactions when filter is unsupported#2281
Dev10-sys wants to merge 2 commits intoLFDT-web3j:mainfrom
Dev10-sys:fix/pending-tx-websocket-fallback

Conversation

@Dev10-sys
Copy link
Copy Markdown
Contributor

Fixes an issue where pendingTransactionFlowable fails when the node does not support filter-based APIs like eth_newPendingTransactionFilter.

Some nodes (for example BSC or Avalanche) only support websocket subscriptions and return errors when filter APIs are used.

This change adds a fallback to use eth_subscribe (newPendingTransactions) when filter-based polling fails, ensuring pending transactions can still be received over WebSocket connections.

Also improves handling of unexpected result types returned by some nodes.

Fixes #1941

…j#1941)

Signed-off-by: Dev10-sys <kalpanagola9897@gmail.com>
@Dev10-sys Dev10-sys force-pushed the fix/pending-tx-websocket-fallback branch from cd58360 to c765a63 Compare April 27, 2026 07:32
Merged upstream's Async executor lifecycle fix entries (LFDT-web3j#2244, LFDT-web3j#2255)
with our pending tx WebSocket fallback entry (LFDT-web3j#1941).

Signed-off-by: Dev10-sys <dev10.sys@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant