feat: relay use async send msg#5001
Merged
Merged
Conversation
Collaborator
|
Please rebase onto develop branch. |
74dfc5d to
61a11ea
Compare
Collaborator
58db65d to
5c6bfca
Compare
quake
reviewed
Nov 20, 2025
| .expect("start preload_unverified_block should ok"); | ||
|
|
||
| let (process_block_tx, process_block_rx) = channel::bounded(0); | ||
| let (process_block_tx, process_block_rx) = channel::bounded(24); |
Member
There was a problem hiding this comment.
How is this fixed value calculated?
Contributor
Author
There was a problem hiding this comment.
There's no calculation basis here; it's just fixing 0 into a bounded value. Using 0 here is actually unreasonable.
@eval-exec and I discussed why it was written as 0 here, but there was no reason why it had to be 0.
The blocks received here come from three sources: RPC mining, sync protocol synchronization, and relay protocol synchronization. A value of 0 means that only one source of data can be received at a time; the other source must wait for processing to complete, but this waiting is not mandatory.
Therefore, a small value was filled in here.
5c6bfca to
cba1336
Compare
cba1336 to
eff32e8
Compare
eval-exec
previously approved these changes
Nov 20, 2025
eff32e8 to
cea55ac
Compare
cea55ac to
3d0da7c
Compare
eval-exec
approved these changes
Nov 20, 2025
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
async send avoids the problem of messages failing to be sent due to insufficient capacity during congestion.
Check List
Tests
Release note