mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 15:35:42 +00:00
Request backed candidates unbounded. (#5610)
We are awaiting on the oneshot anyways, so we have back pressure. By using the unbounded channel make log messages like the following less likely (due to higher priority): 2022-05-30 13:46:38 2022-05-30 11:46:38.565 WARN tokio-runtime-worker parachain::provisioner: failed to assemble or send inherent data err=CanceledBackedCandidates(Canceled)
This commit is contained in:
@@ -505,13 +505,11 @@ async fn select_candidates(
|
|||||||
|
|
||||||
// now get the backed candidates corresponding to these candidate receipts
|
// now get the backed candidates corresponding to these candidate receipts
|
||||||
let (tx, rx) = oneshot::channel();
|
let (tx, rx) = oneshot::channel();
|
||||||
sender
|
sender.send_unbounded_message(CandidateBackingMessage::GetBackedCandidates(
|
||||||
.send_message(CandidateBackingMessage::GetBackedCandidates(
|
relay_parent,
|
||||||
relay_parent,
|
selected_candidates.clone(),
|
||||||
selected_candidates.clone(),
|
tx,
|
||||||
tx,
|
));
|
||||||
))
|
|
||||||
.await;
|
|
||||||
let mut candidates = rx.await.map_err(|err| Error::CanceledBackedCandidates(err))?;
|
let mut candidates = rx.await.map_err(|err| Error::CanceledBackedCandidates(err))?;
|
||||||
|
|
||||||
// `selected_candidates` is generated in ascending order by core index, and `GetBackedCandidates`
|
// `selected_candidates` is generated in ascending order by core index, and `GetBackedCandidates`
|
||||||
|
|||||||
Reference in New Issue
Block a user