mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
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:
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user