From c1474976fece25aa61105de42b9e48b32567865b Mon Sep 17 00:00:00 2001 From: Stan Drozd Date: Sun, 6 Jan 2019 11:11:19 +0100 Subject: [PATCH] types: remove [Active|Crystallized]State --- beacon_chain/types/src/active_state.rs | 17 ------------ beacon_chain/types/src/crystallized_state.rs | 28 -------------------- beacon_chain/types/src/lib.rs | 4 --- 3 files changed, 49 deletions(-) delete mode 100644 beacon_chain/types/src/active_state.rs delete mode 100644 beacon_chain/types/src/crystallized_state.rs diff --git a/beacon_chain/types/src/active_state.rs b/beacon_chain/types/src/active_state.rs deleted file mode 100644 index 5661fd60e..000000000 --- a/beacon_chain/types/src/active_state.rs +++ /dev/null @@ -1,17 +0,0 @@ -use super::Hash256; -use super::{Attestation, SpecialRecord}; - -#[derive(Debug, PartialEq)] -pub struct ActiveState { - pub pending_attestations: Vec, - pub pending_specials: Vec, - pub recent_block_hashes: Vec, - pub randao_mix: Hash256, -} - -impl ActiveState { - // TODO: implement this. - pub fn canonical_root(&self) -> Hash256 { - Hash256::zero() - } -} diff --git a/beacon_chain/types/src/crystallized_state.rs b/beacon_chain/types/src/crystallized_state.rs deleted file mode 100644 index 454454a17..000000000 --- a/beacon_chain/types/src/crystallized_state.rs +++ /dev/null @@ -1,28 +0,0 @@ -use super::crosslink_record::CrosslinkRecord; -use super::shard_committee::ShardCommittee; -use super::validator_record::ValidatorRecord; -use super::Hash256; - -#[derive(Debug, PartialEq)] -pub struct CrystallizedState { - pub validator_set_change_slot: u64, - pub validators: Vec, - pub crosslinks: Vec, - pub last_state_recalculation_slot: u64, - pub last_finalized_slot: u64, - pub last_justified_slot: u64, - pub justified_streak: u64, - pub shard_and_committee_for_slots: Vec>, - pub deposits_penalized_in_period: Vec, - pub validator_set_delta_hash_chain: Hash256, - pub pre_fork_version: u32, - pub post_fork_version: u32, - pub fork_slot_number: u32, -} - -impl CrystallizedState { - // TODO: implement this. - pub fn canonical_root(&self) -> Hash256 { - Hash256::zero() - } -} diff --git a/beacon_chain/types/src/lib.rs b/beacon_chain/types/src/lib.rs index b1bc03c31..3ffa9ff2d 100644 --- a/beacon_chain/types/src/lib.rs +++ b/beacon_chain/types/src/lib.rs @@ -5,7 +5,6 @@ extern crate ssz; pub mod test_utils; -pub mod active_state; pub mod attestation_data; pub mod attestation; pub mod beacon_block; @@ -14,7 +13,6 @@ pub mod beacon_state; pub mod candidate_pow_receipt_root_record; pub mod casper_slashing; pub mod crosslink_record; -pub mod crystallized_state; pub mod deposit; pub mod deposit_data; pub mod deposit_input; @@ -33,7 +31,6 @@ pub mod validator_registration; use self::ethereum_types::{H160, H256, U256}; use std::collections::HashMap; -pub use crate::active_state::ActiveState; pub use crate::attestation_data::AttestationData; pub use crate::attestation::Attestation; pub use crate::beacon_block::BeaconBlock; @@ -41,7 +38,6 @@ pub use crate::beacon_block_body::BeaconBlockBody; pub use crate::beacon_state::BeaconState; pub use crate::casper_slashing::CasperSlashing; pub use crate::crosslink_record::CrosslinkRecord; -pub use crate::crystallized_state::CrystallizedState; pub use crate::deposit::Deposit; pub use crate::deposit_data::DepositData; pub use crate::deposit_input::DepositInput;