Add http endpoint to add trusted peer (#7068)

* Add a trusted_peers endpoint

* Maintain trusted peers in heartbeat
This commit is contained in:
Pawan Dhananjay
2025-03-03 19:34:14 -08:00
committed by GitHub
parent e12719c404
commit 9436f23843
8 changed files with 90 additions and 6 deletions

View File

@@ -1236,6 +1236,11 @@ impl<E: EthSpec> Network<E> {
}
}
pub fn dial_trusted_peer(&mut self, enr: Enr) {
self.peer_manager_mut().add_trusted_peer(enr.clone());
self.peer_manager_mut().dial_peer(enr);
}
/* Sub-behaviour event handling functions */
/// Handle a gossipsub event.