mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-13 01:05:50 +00:00
Keep the table router for the lifetime of the validation instance alive (#1175)
This pr ensures that the table router stays alive for the lifetime of the validation instance. This is required to ensure that the node responds onto gossip messages for the particular relay chain round. Before, the table router was only kept alive for relay chain nodes that were assigned to a Parachain, however the lifetime was also relative short. This lead to bugs where a relay chain node did not include PoVBlock's, because it did not receive them (rejected them on receive, because it was not listening on the particular round).
This commit is contained in:
@@ -503,7 +503,10 @@ impl ProtocolHandler {
|
||||
}
|
||||
|
||||
fn on_connect(&mut self, peer: PeerId, role: ObservedRole) {
|
||||
let claimed_validator = matches!(role, ObservedRole::OurSentry | ObservedRole::OurGuardedAuthority | ObservedRole::Authority);
|
||||
let claimed_validator = matches!(
|
||||
role,
|
||||
ObservedRole::OurSentry | ObservedRole::OurGuardedAuthority | ObservedRole::Authority
|
||||
);
|
||||
|
||||
self.peers.insert(peer.clone(), PeerData {
|
||||
claimed_validator,
|
||||
@@ -978,7 +981,11 @@ impl<Api, Sp, Gossip> Worker<Api, Sp, Gossip> where
|
||||
);
|
||||
}
|
||||
ServiceToWorkerMsg::AwaitCollation(relay_parent, para_id, sender) => {
|
||||
debug!(target: "p_net", "Attempting to get collation for parachain {:?} on relay parent {:?}", para_id, relay_parent);
|
||||
debug!(
|
||||
target: "p_net", "Attempting to get collation for parachain {:?} on relay parent {:?}",
|
||||
para_id,
|
||||
relay_parent,
|
||||
);
|
||||
self.protocol_handler.await_collation(relay_parent, para_id, sender)
|
||||
}
|
||||
ServiceToWorkerMsg::NoteBadCollator(collator) => {
|
||||
|
||||
Reference in New Issue
Block a user