Skip to content

Commit

Permalink
Add quoted u64/u64_vec to SyncCommitteeSubscription (sigp#2589)
Browse files Browse the repository at this point in the history
## Issue Addressed

Resolves sigp#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
  • Loading branch information
mstallmo committed Sep 11, 2021
1 parent 46cd67d commit f7dd24c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions consensus/types/src/sync_committee_subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7dd24c

Please sign in to comment.