mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 02:12:33 +00:00
Altair networking (#2300)
## Issue Addressed Resolves #2278 ## Proposed Changes Implements the networking components for the Altair hard fork https://github.com/ethereum/eth2.0-specs/blob/dev/specs/altair/p2p-interface.md ## Additional Info This PR acts as the base branch for networking changes and tracks https://github.com/sigp/lighthouse/pull/2279 . Changes to gossip, rpc and discovery can be separate PRs to be merged here for ease of review. Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use beacon_chain::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
use types::ChainSpec;
|
||||
|
||||
use eth2_libp2p::rpc::StatusMessage;
|
||||
/// Trait to produce a `StatusMessage` representing the state of the given `beacon_chain`.
|
||||
@@ -13,10 +12,7 @@ pub trait ToStatusMessage {
|
||||
impl<T: BeaconChainTypes> ToStatusMessage for BeaconChain<T> {
|
||||
fn status_message(&self) -> Result<StatusMessage, BeaconChainError> {
|
||||
let head_info = self.head_info()?;
|
||||
let genesis_validators_root = self.genesis_validators_root;
|
||||
|
||||
let fork_digest =
|
||||
ChainSpec::compute_fork_digest(head_info.fork.current_version, genesis_validators_root);
|
||||
let fork_digest = self.enr_fork_id().fork_digest;
|
||||
|
||||
Ok(StatusMessage {
|
||||
fork_digest,
|
||||
|
||||
Reference in New Issue
Block a user