Remove old chain state transition code

This commit is contained in:
Paul Hauner 2018-12-25 18:22:46 +11:00
parent f140e2938f
commit a7756ea4b5
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C
2 changed files with 0 additions and 31 deletions

View File

@ -1,7 +1,6 @@
extern crate db;
extern crate naive_fork_choice;
extern crate ssz;
extern crate state_transition;
extern crate types;
extern crate validator_induction;
extern crate validator_shuffling;
@ -10,7 +9,6 @@ mod block_processing;
mod genesis;
mod maps;
mod stores;
mod transition;
use db::ClientDB;
use crate::genesis::{genesis_states, Error as GenesisError};

View File

@ -1,29 +0,0 @@
use super::BeaconChain;
use db::ClientDB;
use state_transition::{extend_active_state, StateTransitionError};
use types::{ActiveState, BeaconBlock, CrystallizedState, Hash256};
impl<T> BeaconChain<T>
where
T: ClientDB + Sized,
{
pub(crate) fn transition_states(
&self,
act_state: &ActiveState,
cry_state: &CrystallizedState,
block: &BeaconBlock,
block_hash: &Hash256,
) -> Result<(ActiveState, Option<CrystallizedState>), StateTransitionError> {
let state_recalc_distance = block
.slot
.checked_sub(cry_state.last_state_recalculation_slot)
.ok_or(StateTransitionError::BlockSlotBeforeRecalcSlot)?;
if state_recalc_distance >= u64::from(self.config.cycle_length) {
panic!("Not implemented!")
} else {
let new_act_state = extend_active_state(act_state, block, block_hash)?;
Ok((new_act_state, None))
}
}
}