mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +00:00
Update /rewards endpoints to match spec (#8967)
I believe one of our rewards endpoints is slightly out of spec. We do not return the `finalized` status for `post_beacon_rewards_attestations`. Additionally, the `eth2` client doesn't expect the correct wrapper types for some other endpoints. - Update `post_beacon_rewards_attestations` server implementation to match spec. - Update all three client functions in `eth2` to the correct wrapper type. - Add missing tests for `http_api` to detect any regressions. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -1802,7 +1802,7 @@ impl BeaconNodeHttpClient {
|
||||
&self,
|
||||
block_id: BlockId,
|
||||
validators: &[ValidatorId],
|
||||
) -> Result<GenericResponse<Vec<SyncCommitteeReward>>, Error> {
|
||||
) -> Result<ExecutionOptimisticFinalizedResponse<Vec<SyncCommitteeReward>>, Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
|
||||
path.path_segments_mut()
|
||||
@@ -1819,7 +1819,7 @@ impl BeaconNodeHttpClient {
|
||||
pub async fn get_beacon_rewards_blocks(
|
||||
&self,
|
||||
block_id: BlockId,
|
||||
) -> Result<GenericResponse<StandardBlockReward>, Error> {
|
||||
) -> Result<ExecutionOptimisticFinalizedResponse<StandardBlockReward>, Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
|
||||
path.path_segments_mut()
|
||||
@@ -1837,7 +1837,7 @@ impl BeaconNodeHttpClient {
|
||||
&self,
|
||||
epoch: Epoch,
|
||||
validators: &[ValidatorId],
|
||||
) -> Result<StandardAttestationRewards, Error> {
|
||||
) -> Result<ExecutionOptimisticFinalizedResponse<StandardAttestationRewards>, Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
|
||||
path.path_segments_mut()
|
||||
|
||||
Reference in New Issue
Block a user