Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Poll the substream validation before polling Notifications #13934

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

altonen
Copy link
Contributor

@altonen altonen commented Apr 17, 2023

In tests, it can happen that Notifications doesn't produce any events which causes poll() to return Poll::Pending and the substream validation futures won't get polled.

Poll the futures before calling Notifications so results for substream validations are received even if Notifications is not producing any events.

In tests, it can happen that `Notifications` doesn't produce any events
which causes `poll()` to return `Poll::Pending` and the substream
validation futures won't get polled.

Poll the futures before calling `Notifications` so results for substream
validations are received even if `Notifications` is not producing any
events.
@altonen altonen added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”. labels Apr 17, 2023
@altonen altonen requested a review from a team April 17, 2023 15:49
client/network/src/protocol.rs Show resolved Hide resolved
client/network/src/protocol.rs Show resolved Hide resolved
@altonen
Copy link
Contributor Author

altonen commented Apr 18, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit af29c6f into master Apr 18, 2023
@paritytech-processbot paritytech-processbot bot deleted the protocol-fix-validation-polling branch April 18, 2023 07:47
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
…ech#13934)

* Poll the substream validation before polling `Notifications`

In tests, it can happen that `Notifications` doesn't produce any events
which causes `poll()` to return `Poll::Pending` and the substream
validation futures won't get polled.

Poll the futures before calling `Notifications` so results for substream
validations are received even if `Notifications` is not producing any
events.

* Remove `pending_messages`

* Remove unused import
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants