Metadata request ordering (#6336)

* Send metadata request ordering

* Merge branch 'unstable' into metadata-order
This commit is contained in:
Pawan Dhananjay
2024-09-04 22:39:03 -07:00
committed by GitHub
parent b50ce60662
commit 0fb4a2046c

View File

@@ -240,10 +240,6 @@ impl<E: EthSpec> PeerManager<E> {
"connection" => ?endpoint.to_endpoint()
);
if other_established == 0 {
self.events.push(PeerManagerEvent::MetaData(peer_id));
}
// Update the prometheus metrics
if self.metrics_enabled {
metrics::inc_counter(&metrics::PEER_CONNECT_EVENT_COUNT);
@@ -267,6 +263,10 @@ impl<E: EthSpec> PeerManager<E> {
return;
}
if other_established == 0 {
self.events.push(PeerManagerEvent::MetaData(peer_id));
}
// NOTE: We don't register peers that we are disconnecting immediately. The network service
// does not need to know about these peers.
match endpoint {