From 20ecb35351af53f4f08d049101d6eff43b001d1c Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Thu, 20 Feb 2025 10:13:13 +0800 Subject: [PATCH] post endpoint return selection proof --- common/eth2/src/lib.rs | 4 ++-- consensus/types/src/selection_proof.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/eth2/src/lib.rs b/common/eth2/src/lib.rs index 7a87eeb90c..1bcf52192d 100644 --- a/common/eth2/src/lib.rs +++ b/common/eth2/src/lib.rs @@ -2669,7 +2669,7 @@ impl BeaconNodeHttpClient { pub async fn post_validator_beacon_committee_selections( &self, selections: &[BeaconCommitteeSelection], - ) -> Result<(), Error> { + ) -> Result, Error> { let mut path = self.eth_path(V1)?; path.path_segments_mut() @@ -2677,7 +2677,7 @@ impl BeaconNodeHttpClient { .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 } } diff --git a/consensus/types/src/selection_proof.rs b/consensus/types/src/selection_proof.rs index c80a00c3d1..47362717bd 100644 --- a/consensus/types/src/selection_proof.rs +++ b/consensus/types/src/selection_proof.rs @@ -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 {