Skip to content

Commit

Permalink
post endpoint return selection proof
Browse files Browse the repository at this point in the history
  • Loading branch information
chong-he committed Feb 20, 2025
1 parent 83db29a commit 20ecb35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/eth2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2669,15 +2669,15 @@ impl BeaconNodeHttpClient {
pub async fn post_validator_beacon_committee_selections(
&self,
selections: &[BeaconCommitteeSelection],
) -> Result<(), Error> {
) -> Result<GenericResponse<SelectionProof>, Error> {
let mut path = self.eth_path(V1)?;

path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
.push("validator")
.push("beacon_committee_selections");

self.post_with_timeout(path, &selections, self.timeouts.attester_duties)
self.post_with_timeout_and_response(path, &selections, self.timeouts.attester_duties)
.await
}
}
Expand Down
3 changes: 2 additions & 1 deletion consensus/types/src/selection_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ use crate::{
};
use ethereum_hashing::hash;
use safe_arith::{ArithError, SafeArith};
use serde::{Deserialize, Serialize};
use ssz::Encode;
use std::cmp;

#[derive(arbitrary::Arbitrary, PartialEq, Debug, Clone)]
#[derive(arbitrary::Arbitrary, PartialEq, Debug, Clone, Serialize, Deserialize)]
pub struct SelectionProof(Signature);

impl SelectionProof {
Expand Down

0 comments on commit 20ecb35

Please sign in to comment.