mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 20:39:10 +00:00
Add contribution and proof event (#2527)
## Issue Addressed N/A ## Proposed Changes Add the new ContributionAndProof event: https://github.com/ethereum/beacon-APIs/pull/158 ## Additional Info N/A Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -1615,6 +1615,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
metrics::inc_counter(&metrics::SYNC_CONTRIBUTION_PROCESSING_REQUESTS);
|
||||
let _timer = metrics::start_timer(&metrics::SYNC_CONTRIBUTION_GOSSIP_VERIFICATION_TIMES);
|
||||
VerifiedSyncContribution::verify(sync_contribution, self).map(|v| {
|
||||
if let Some(event_handler) = self.event_handler.as_ref() {
|
||||
if event_handler.has_contribution_subscribers() {
|
||||
event_handler.register(EventKind::ContributionAndProof(Box::new(
|
||||
v.aggregate().clone(),
|
||||
)));
|
||||
}
|
||||
}
|
||||
metrics::inc_counter(&metrics::SYNC_CONTRIBUTION_PROCESSING_SUCCESSES);
|
||||
v
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user