mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +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:
@@ -21,7 +21,6 @@ pub struct ServerSentEventHandler<E: EthSpec> {
|
||||
late_head: Sender<EventKind<E>>,
|
||||
light_client_finality_update_tx: Sender<EventKind<E>>,
|
||||
light_client_optimistic_update_tx: Sender<EventKind<E>>,
|
||||
block_reward_tx: Sender<EventKind<E>>,
|
||||
proposer_slashing_tx: Sender<EventKind<E>>,
|
||||
attester_slashing_tx: Sender<EventKind<E>>,
|
||||
bls_to_execution_change_tx: Sender<EventKind<E>>,
|
||||
@@ -48,7 +47,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
|
||||
let (late_head, _) = broadcast::channel(capacity);
|
||||
let (light_client_finality_update_tx, _) = broadcast::channel(capacity);
|
||||
let (light_client_optimistic_update_tx, _) = broadcast::channel(capacity);
|
||||
let (block_reward_tx, _) = broadcast::channel(capacity);
|
||||
let (proposer_slashing_tx, _) = broadcast::channel(capacity);
|
||||
let (attester_slashing_tx, _) = broadcast::channel(capacity);
|
||||
let (bls_to_execution_change_tx, _) = broadcast::channel(capacity);
|
||||
@@ -69,7 +67,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
|
||||
late_head,
|
||||
light_client_finality_update_tx,
|
||||
light_client_optimistic_update_tx,
|
||||
block_reward_tx,
|
||||
proposer_slashing_tx,
|
||||
attester_slashing_tx,
|
||||
bls_to_execution_change_tx,
|
||||
@@ -142,10 +139,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
|
||||
.light_client_optimistic_update_tx
|
||||
.send(kind)
|
||||
.map(|count| log_count("light client optimistic update", count)),
|
||||
EventKind::BlockReward(_) => self
|
||||
.block_reward_tx
|
||||
.send(kind)
|
||||
.map(|count| log_count("block reward", count)),
|
||||
EventKind::ProposerSlashing(_) => self
|
||||
.proposer_slashing_tx
|
||||
.send(kind)
|
||||
@@ -224,10 +217,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
|
||||
self.light_client_optimistic_update_tx.subscribe()
|
||||
}
|
||||
|
||||
pub fn subscribe_block_reward(&self) -> Receiver<EventKind<E>> {
|
||||
self.block_reward_tx.subscribe()
|
||||
}
|
||||
|
||||
pub fn subscribe_attester_slashing(&self) -> Receiver<EventKind<E>> {
|
||||
self.attester_slashing_tx.subscribe()
|
||||
}
|
||||
@@ -292,10 +281,6 @@ impl<E: EthSpec> ServerSentEventHandler<E> {
|
||||
self.late_head.receiver_count() > 0
|
||||
}
|
||||
|
||||
pub fn has_block_reward_subscribers(&self) -> bool {
|
||||
self.block_reward_tx.receiver_count() > 0
|
||||
}
|
||||
|
||||
pub fn has_proposer_slashing_subscribers(&self) -> bool {
|
||||
self.proposer_slashing_tx.receiver_count() > 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user