Skip to content

rpc: avoid blocking executor in peer_getbasicinfo#513

Open
mooncitydev wants to merge 1 commit intoQuantus-Network:mainfrom
mooncitydev:rpc-peer-async-no-block-on
Open

rpc: avoid blocking executor in peer_getbasicinfo#513
mooncitydev wants to merge 1 commit intoQuantus-Network:mainfrom
mooncitydev:rpc-peer-async-no-block-on

Conversation

@mooncitydev
Copy link
Copy Markdown

This change replaces blocking on the async runtime with a proper await when fetching network state for peer_getBasicInfo.

Using futures::executor::block_on inside jsonrpsee RPC handlers blocks the async runtime and can stall other RPC under load; this matches the async pattern already used in txwatch.rs.

made by mooncitydev

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