prospective-parachains: respond with multiple backable candidates (#3160)

Fixes https://github.com/paritytech/polkadot-sdk/issues/3129
This commit is contained in:
Alin Dima authored and GitHub committed 2024-02-06 08:21:28 +00:00
1 parent 53f615de50
commit 7df1ae3b81
9 files changed
+844 -92

No files matched your search

+5 -2
View File
@@ -806,15 +806,18 @@ async fn get_backable_candidate(
) -> Result<Option<(CandidateHash, Hash)>, Error> {
let (tx, rx) = oneshot::channel();
sender
.send_message(ProspectiveParachainsMessage::GetBackableCandidate(
.send_message(ProspectiveParachainsMessage::GetBackableCandidates(
relay_parent,
para_id,
1, // core count hardcoded to 1, until elastic scaling is implemented and enabled.
required_path,
tx,
))
.await;
rx.await.map_err(Error::CanceledBackableCandidate)
rx.await
.map_err(Error::CanceledBackableCandidate)
.map(|res| res.get(0).copied())
}
/// The availability bitfield for a given core is the transpose