mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 10:52:43 +00:00
Bump all spec tags to v0.12.1 (#1275)
This commit is contained in:
@@ -7,7 +7,7 @@ use types::*;
|
||||
|
||||
/// Initialize a `BeaconState` from genesis data.
|
||||
///
|
||||
/// Spec v0.11.1
|
||||
/// Spec v0.12.1
|
||||
// TODO: this is quite inefficient and we probably want to rethink how we do this
|
||||
pub fn initialize_beacon_state_from_eth1<T: EthSpec>(
|
||||
eth1_block_hash: Hash256,
|
||||
@@ -50,7 +50,7 @@ pub fn initialize_beacon_state_from_eth1<T: EthSpec>(
|
||||
|
||||
/// Determine whether a candidate genesis state is suitable for starting the chain.
|
||||
///
|
||||
/// Spec v0.11.1
|
||||
/// Spec v0.12.1
|
||||
pub fn is_valid_genesis_state<T: EthSpec>(state: &BeaconState<T>, spec: &ChainSpec) -> bool {
|
||||
state.genesis_time >= spec.min_genesis_time
|
||||
&& state.get_active_validator_indices(T::genesis_epoch()).len() as u64
|
||||
@@ -59,7 +59,7 @@ pub fn is_valid_genesis_state<T: EthSpec>(state: &BeaconState<T>, spec: &ChainSp
|
||||
|
||||
/// Activate genesis validators, if their balance is acceptable.
|
||||
///
|
||||
/// Spec v0.11.1
|
||||
/// Spec v0.12.1
|
||||
pub fn process_activations<T: EthSpec>(
|
||||
state: &mut BeaconState<T>,
|
||||
spec: &ChainSpec,
|
||||
@@ -82,7 +82,7 @@ pub fn process_activations<T: EthSpec>(
|
||||
///
|
||||
/// Does _not_ ensure that the time is greater than `MIN_GENESIS_TIME`.
|
||||
///
|
||||
/// Spec v0.11.1
|
||||
/// Spec v0.12.1
|
||||
pub fn eth2_genesis_time(eth1_timestamp: u64, spec: &ChainSpec) -> Result<u64, ArithError> {
|
||||
eth1_timestamp.safe_add(spec.genesis_delay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user