mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Merge branch 'unstable' into max-blobs-preset
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use crate::common::update_progressive_balances_cache::initialize_progressive_balances_cache;
|
||||
use crate::epoch_cache::initialize_epoch_cache;
|
||||
use types::{BeaconState, ChainSpec, EpochCacheError, EthSpec, Hash256, RelativeEpoch};
|
||||
use types::{
|
||||
BeaconState, ChainSpec, EpochCacheError, EthSpec, FixedBytesExtended, Hash256, RelativeEpoch,
|
||||
};
|
||||
|
||||
/// Mixin trait for the beacon state that provides operations on *all* caches.
|
||||
///
|
||||
|
||||
@@ -3,7 +3,9 @@ use crate::common::base::SqrtTotalActiveBalance;
|
||||
use crate::common::{altair, base};
|
||||
use safe_arith::SafeArith;
|
||||
use types::epoch_cache::{EpochCache, EpochCacheError, EpochCacheKey};
|
||||
use types::{ActivationQueue, BeaconState, ChainSpec, EthSpec, ForkName, Hash256};
|
||||
use types::{
|
||||
ActivationQueue, BeaconState, ChainSpec, EthSpec, FixedBytesExtended, ForkName, Hash256,
|
||||
};
|
||||
|
||||
/// Precursor to an `EpochCache`.
|
||||
pub struct PreEpochCache {
|
||||
|
||||
@@ -30,7 +30,7 @@ pub fn verify_bls_to_execution_change<E: EthSpec>(
|
||||
verify!(
|
||||
validator
|
||||
.withdrawal_credentials
|
||||
.as_bytes()
|
||||
.as_slice()
|
||||
.first()
|
||||
.map(|byte| *byte == spec.bls_withdrawal_prefix_byte)
|
||||
.unwrap_or(false),
|
||||
@@ -41,7 +41,7 @@ pub fn verify_bls_to_execution_change<E: EthSpec>(
|
||||
// future.
|
||||
let pubkey_hash = hash(address_change.from_bls_pubkey.as_serialized());
|
||||
verify!(
|
||||
validator.withdrawal_credentials.as_bytes().get(1..) == pubkey_hash.get(1..),
|
||||
validator.withdrawal_credentials.as_slice().get(1..) == pubkey_hash.get(1..),
|
||||
Invalid::WithdrawalCredentialsMismatch
|
||||
);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use crate::per_epoch_processing::process_epoch;
|
||||
use beacon_chain::test_utils::BeaconChainHarness;
|
||||
use beacon_chain::types::{EthSpec, MinimalEthSpec};
|
||||
use bls::Hash256;
|
||||
use bls::{FixedBytesExtended, Hash256};
|
||||
use env_logger::{Builder, Env};
|
||||
use types::Slot;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! duplication and protect against some easy-to-make mistakes when performing state advances.
|
||||
|
||||
use crate::*;
|
||||
use types::{BeaconState, ChainSpec, EthSpec, Hash256, Slot};
|
||||
use types::{BeaconState, ChainSpec, EthSpec, FixedBytesExtended, Hash256, Slot};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Error {
|
||||
|
||||
Reference in New Issue
Block a user