mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 23:08:23 +00:00
Remove /lighthouse/analysis/block_rewards APIs (#8935)
Mark pointed out that these APIs will require updates for Gloas, so I figured we may as well get rid of them. As far as I know, blockprint was the only use case and it is now defunct. The consensus block value is included in getBlock API responses, so there's no reason for VCs to use the `POST` API, and there is now a standard API for the rewards of canonical blocks. The SSE event was non-standard, and likely only used by blockprint as well. Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -1571,24 +1571,6 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
|
||||
|
||||
metrics::stop_timer(committee_timer);
|
||||
|
||||
/*
|
||||
* If we have block reward listeners, compute the block reward and push it to the
|
||||
* event handler.
|
||||
*/
|
||||
if let Some(ref event_handler) = chain.event_handler
|
||||
&& event_handler.has_block_reward_subscribers()
|
||||
{
|
||||
let mut reward_cache = Default::default();
|
||||
let block_reward = chain.compute_block_reward(
|
||||
block.message(),
|
||||
block_root,
|
||||
&state,
|
||||
&mut reward_cache,
|
||||
true,
|
||||
)?;
|
||||
event_handler.register(EventKind::BlockReward(block_reward));
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform `per_block_processing` on the block and state, returning early if the block is
|
||||
* invalid.
|
||||
|
||||
Reference in New Issue
Block a user