Skip to content

Fix local chain methods over WebSocket#266

Open
GhostStar wants to merge 1 commit into
drpcorg:mainfrom
GhostStar:fix/ws-local-chain-methods
Open

Fix local chain methods over WebSocket#266
GhostStar wants to merge 1 commit into
drpcorg:mainfrom
GhostStar:fix/ws-local-chain-methods

Conversation

@GhostStar

Copy link
Copy Markdown

Summary

  • handle eth_chainId and net_version before the WebSocket unsubscribe path
  • preserve subscription cancellation behavior for local unsubscribe methods
  • cover both HTTP and WebSocket request contexts in the local processor test

Root cause

Every request received through the WebSocket server has a non-nil subscription context. The local request processor treated every local method with such a context as an unsubscribe request and attempted to read params[0]. Standard parameterless methods such as eth_chainId and net_version therefore failed with value not exists.

Tests

  • go test ./internal/upstreams/flow -run TestLocalRequestProcessor -count=1
  • go test ./internal/upstreams/flow -count=1
  • go test ./... -count=1
  • make build

@mxssl
mxssl requested a review from KirillPamPam July 11, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant