Enable async backing by default for Rococo/Westend (#3162)

This change is mainly for people running the local variants. They can
directly start with async backing.

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
Bastian KöcherandAlexandru Gheorghe authored and GitHub committed 2024-02-02 19:51:56 +00:00
1 parent 4d78c6eb89
commit e0674cb3ad
4 files changed
+73 -19

No files matched your search

@@ -202,7 +202,10 @@ impl CandidateStorage {
/// Note that an existing candidate has been backed.
pub fn mark_backed(&mut self, candidate_hash: &CandidateHash) {
if let Some(entry) = self.by_candidate_hash.get_mut(candidate_hash) {
gum::trace!(target: LOG_TARGET, ?candidate_hash, "Candidate marked as backed");
entry.state = CandidateState::Backed;
} else {
gum::trace!(target: LOG_TARGET, ?candidate_hash, "Candidate not found while marking as backed");
}
}
@@ -607,6 +607,14 @@ fn answer_get_backable_candidate(
let Some(child_hash) =
tree.select_child(&required_path, |candidate| storage.is_backed(candidate))
else {
gum::trace!(
target: LOG_TARGET,
?required_path,
para_id = ?para,
%relay_parent,
"Could not find any backable candidate",
);
let _ = tx.send(None);
return
};
@@ -621,6 +629,14 @@ fn answer_get_backable_candidate(
return
};
gum::trace!(
target: LOG_TARGET,
?relay_parent,
candidate_hash = ?child_hash,
?candidate_relay_parent,
"Found backable candidate",
);
let _ = tx.send(Some((child_hash, candidate_relay_parent)));
}