mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Improve dispute-coordinator message burstiness handling (#5471)
* Increase message channel size to 2048 Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Use unbounded channel for reading data Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -599,7 +599,8 @@ async fn request_disputes(
|
||||
RequestType::Recent => DisputeCoordinatorMessage::RecentDisputes(tx),
|
||||
RequestType::Active => DisputeCoordinatorMessage::ActiveDisputes(tx),
|
||||
};
|
||||
sender.send_message(msg.into()).await;
|
||||
// Bounded by block production - `ProvisionerMessage::RequestInherentData`.
|
||||
sender.send_unbounded_message(msg.into());
|
||||
|
||||
let recent_disputes = match rx.await {
|
||||
Ok(r) => r,
|
||||
@@ -617,9 +618,10 @@ async fn request_votes(
|
||||
disputes_to_query: Vec<(SessionIndex, CandidateHash)>,
|
||||
) -> Vec<(SessionIndex, CandidateHash, CandidateVotes)> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
sender
|
||||
.send_message(DisputeCoordinatorMessage::QueryCandidateVotes(disputes_to_query, tx).into())
|
||||
.await;
|
||||
// Bounded by block production - `ProvisionerMessage::RequestInherentData`.
|
||||
sender.send_unbounded_message(
|
||||
DisputeCoordinatorMessage::QueryCandidateVotes(disputes_to_query, tx).into(),
|
||||
);
|
||||
|
||||
match rx.await {
|
||||
Ok(v) => v,
|
||||
|
||||
Reference in New Issue
Block a user