{
table: Arc ,
exit: E,
task_executor: T,
parent_hash: Hash,
attestation_topic: Hash,
knowledge: Arc Router {
pub(crate) fn new(
table: Arc ,
task_executor: T,
parent_hash: Hash,
knowledge: Arc Clone for Router {
fn clone(&self) -> Self {
Router {
table: self.table.clone(),
network: self.network.clone(),
api: self.api.clone(),
task_executor: self.task_executor.clone(),
parent_hash: self.parent_hash.clone(),
attestation_topic: self.attestation_topic.clone(),
deferred_statements: self.deferred_statements.clone(),
fetch_incoming: self.fetch_incoming.clone(),
knowledge: self.knowledge.clone(),
exit: self.exit.clone(),
}
}
}
impl where
P::Api: ParachainHost where
P::Api: ParachainHost where
P::Api: ParachainHost Drop for Router {
fn drop(&mut self) {
let parent_hash = self.parent_hash.clone();
self.network.with_spec(move |spec, _| spec.remove_validation_session(&parent_hash));
self.network.drop_gossip(self.attestation_topic);
{
let mut incoming_fetched = self.fetch_incoming.lock();
for (para_id, _) in incoming_fetched.drain() {
self.network.drop_gossip(incoming_message_topic(
self.parent_hash,
para_id,
));
}
}
}
}
// A unique trace for valid statements issued by a validator.
#[derive(Hash, PartialEq, Eq, Clone, Debug)]
enum StatementTrace {
Valid(SessionKey, Hash),
Invalid(SessionKey, Hash),
}
// helper for deferring statements whose associated candidate is unknown.
struct DeferredStatements {
deferred: HashMap {
ingress_roots: HashMap Future for ComputeIngress where S: Stream