From de8b84f9cd6a4fadbfc03270544b32a345f8b5b7 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 20 Oct 2018 17:15:36 +1100 Subject: [PATCH] Update `ActiveState` as per new spec --- beacon_chain/types/src/active_state.rs | 30 ++++++-------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/beacon_chain/types/src/active_state.rs b/beacon_chain/types/src/active_state.rs index 6c71cadb8..4b72910fa 100644 --- a/beacon_chain/types/src/active_state.rs +++ b/beacon_chain/types/src/active_state.rs @@ -1,30 +1,12 @@ use super::Hash256; -use super::attestation_record::AttestationRecord; +use super::{ + AttestationRecord, + SpecialRecord, +}; pub struct ActiveState { pub pending_attestations: Vec, + pub pending_specials: Vec, pub recent_block_hashes: Vec, -} - -impl ActiveState { - /// Returns a new instance where all fields are empty vectors. - pub fn zero() -> Self { - Self { - pending_attestations: vec![], - recent_block_hashes: vec![], - } - } -} - - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_act_state_zero() { - let a = ActiveState::zero(); - assert_eq!(a.pending_attestations.len(), 0); - assert_eq!(a.recent_block_hashes.len(), 0); - } + pub randao_mix: Hash256, }