mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
add focil epoch activation
This commit is contained in:
@@ -298,6 +298,30 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Create a new `Work` event for some inclusion list.
|
||||
pub fn send_gossip_inclusion_list(
|
||||
self: &Arc<Self>,
|
||||
message_id: MessageId,
|
||||
peer_id: PeerId,
|
||||
signed_inclusion_list: SignedInclusionList<T::EthSpec>,
|
||||
seen_timestamp: Duration,
|
||||
) -> Result<(), Error<T::EthSpec>> {
|
||||
let processor = self.clone();
|
||||
let process_fn = move || {
|
||||
processor.process_gossip_inclusion_list(
|
||||
message_id,
|
||||
peer_id,
|
||||
signed_inclusion_list,
|
||||
seen_timestamp,
|
||||
)
|
||||
};
|
||||
|
||||
self.try_send(BeaconWorkEvent {
|
||||
drop_during_sync: true,
|
||||
work: Work::GossipInclusionList(Box::new(process_fn)),
|
||||
})
|
||||
}
|
||||
|
||||
/// Create a new `Work` event for some sync committee contribution.
|
||||
pub fn send_gossip_sync_contribution(
|
||||
self: &Arc<Self>,
|
||||
|
||||
@@ -541,8 +541,20 @@ impl<T: BeaconChainTypes> Router<T> {
|
||||
bls_to_execution_change,
|
||||
),
|
||||
),
|
||||
PubsubMessage::InclusionList(_il) => {
|
||||
// TODO(focil)
|
||||
PubsubMessage::InclusionList(inclusion_list) => {
|
||||
trace!(
|
||||
self.log,
|
||||
"Received inclusion list";
|
||||
"peer_id" => %peer_id
|
||||
);
|
||||
self.handle_beacon_processor_send_result(
|
||||
self.network_beacon_processor.send_gossip_inclusion_list(
|
||||
message_id,
|
||||
peer_id,
|
||||
*inclusion_list,
|
||||
timestamp_now(),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user