Remove old chain state transition code
This commit is contained in:
parent
f140e2938f
commit
a7756ea4b5
@ -1,7 +1,6 @@
|
|||||||
extern crate db;
|
extern crate db;
|
||||||
extern crate naive_fork_choice;
|
extern crate naive_fork_choice;
|
||||||
extern crate ssz;
|
extern crate ssz;
|
||||||
extern crate state_transition;
|
|
||||||
extern crate types;
|
extern crate types;
|
||||||
extern crate validator_induction;
|
extern crate validator_induction;
|
||||||
extern crate validator_shuffling;
|
extern crate validator_shuffling;
|
||||||
@ -10,7 +9,6 @@ mod block_processing;
|
|||||||
mod genesis;
|
mod genesis;
|
||||||
mod maps;
|
mod maps;
|
||||||
mod stores;
|
mod stores;
|
||||||
mod transition;
|
|
||||||
|
|
||||||
use db::ClientDB;
|
use db::ClientDB;
|
||||||
use crate::genesis::{genesis_states, Error as GenesisError};
|
use crate::genesis::{genesis_states, Error as GenesisError};
|
||||||
|
@ -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))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user