post endpoint return selection proof

This commit is contained in:
Tan Chee Keong
2025-02-20 10:13:13 +08:00
parent 83db29a0da
commit 20ecb35351
2 changed files with 4 additions and 3 deletions

View File

@@ -2669,7 +2669,7 @@ impl BeaconNodeHttpClient {
pub async fn post_validator_beacon_committee_selections( pub async fn post_validator_beacon_committee_selections(
&self, &self,
selections: &[BeaconCommitteeSelection], selections: &[BeaconCommitteeSelection],
) -> Result<(), Error> { ) -> Result<GenericResponse<SelectionProof>, Error> {
let mut path = self.eth_path(V1)?; let mut path = self.eth_path(V1)?;
path.path_segments_mut() path.path_segments_mut()
@@ -2677,7 +2677,7 @@ impl BeaconNodeHttpClient {
.push("validator") .push("validator")
.push("beacon_committee_selections"); .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 .await
} }
} }

View File

@@ -3,10 +3,11 @@ use crate::{
}; };
use ethereum_hashing::hash; use ethereum_hashing::hash;
use safe_arith::{ArithError, SafeArith}; use safe_arith::{ArithError, SafeArith};
use serde::{Deserialize, Serialize};
use ssz::Encode; use ssz::Encode;
use std::cmp; use std::cmp;
#[derive(arbitrary::Arbitrary, PartialEq, Debug, Clone)] #[derive(arbitrary::Arbitrary, PartialEq, Debug, Clone, Serialize, Deserialize)]
pub struct SelectionProof(Signature); pub struct SelectionProof(Signature);
impl SelectionProof { impl SelectionProof {