Files
lighthouse/beacon_node/operation_pool/src/sync_aggregate_id.rs
realbigsean 4555e33048 Remove serde derive references (#4830)
* remove remaining uses of serde_derive

* fix lockfile

---------

Co-authored-by: João Oliveira <hello@jxs.pt>
2023-10-11 13:01:30 -04:00

22 lines
538 B
Rust

use serde::{Deserialize, Serialize};
use ssz_derive::{Decode, Encode};
use types::{Hash256, Slot};
/// Used to key `SyncAggregate`s in the `naive_sync_aggregation_pool`.
#[derive(
PartialEq, Eq, Clone, Hash, Debug, PartialOrd, Ord, Encode, Decode, Serialize, Deserialize,
)]
pub struct SyncAggregateId {
pub slot: Slot,
pub beacon_block_root: Hash256,
}
impl SyncAggregateId {
pub fn new(slot: Slot, beacon_block_root: Hash256) -> Self {
Self {
slot,
beacon_block_root,
}
}
}