mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
[Altair] Sync committee pools (#2321)
Add pools supporting sync committees: - naive sync aggregation pool - observed sync contributions pool - observed sync contributors pool - observed sync aggregators pool Add SSZ types and tests related to sync committee signatures. Co-authored-by: Michael Sproul <michael@sigmaprime.io> Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
21
beacon_node/operation_pool/src/sync_aggregate_id.rs
Normal file
21
beacon_node/operation_pool/src/sync_aggregate_id.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use serde_derive::{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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user