Add quoted u64/u64_vec to SyncCommitteeSubscription (#2589)

## Issue Addressed

Resolves #2582 

## Proposed Changes

Use `quoted_u64` and `quoted_u64_vec` custom serde deserializers from `eth2_serde_utils` to support the proper Eth2.0 API spec for `/eth/v1/validator/sync_committee_subscriptions`

## Additional Info

N/A
This commit is contained in:
Mason Stallmo 2021-09-11 23:56:16 +00:00
parent 46cd67d519
commit f7dd24c998

View File

@ -7,8 +7,10 @@ use ssz_derive::{Decode, Encode};
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone, Encode, Decode)]
pub struct SyncCommitteeSubscription {
/// The validators index.
#[serde(with = "eth2_serde_utils::quoted_u64")]
pub validator_index: u64,
/// The sync committee indices.
#[serde(with = "eth2_serde_utils::quoted_u64_vec")]
pub sync_committee_indices: Vec<u64>,
/// Epoch until which this subscription is required.
pub until_epoch: Epoch,