mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
Replace lazy_static! with LazyLock (#6189)
* Replace `lazy_static` with `LazyLock`. * Merge branch 'unstable' into remove-lazy-static # Conflicts: # beacon_node/lighthouse_network/src/peer_manager/mod.rs * Lint fixes. * Merge branch 'unstable' into remove-lazy-static # Conflicts: # beacon_node/beacon_chain/src/metrics.rs * Moar lint fixes. * Update rust version to 1.80.0. * Merge branch 'unstable' into remove-lazy-static
This commit is contained in:
@@ -11,8 +11,8 @@ use crate::{
|
||||
BlockSignatureStrategy, ConsensusContext, VerifyBlockRoot, VerifySignatures,
|
||||
};
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
|
||||
use lazy_static::lazy_static;
|
||||
use ssz_types::Bitfield;
|
||||
use std::sync::LazyLock;
|
||||
use test_utils::generate_deterministic_keypairs;
|
||||
use types::*;
|
||||
|
||||
@@ -22,10 +22,9 @@ pub const VALIDATOR_COUNT: usize = 64;
|
||||
pub const EPOCH_OFFSET: u64 = 4;
|
||||
pub const NUM_ATTESTATIONS: u64 = 1;
|
||||
|
||||
lazy_static! {
|
||||
/// A cached set of keys.
|
||||
static ref KEYPAIRS: Vec<Keypair> = generate_deterministic_keypairs(MAX_VALIDATOR_COUNT);
|
||||
}
|
||||
/// A cached set of keys.
|
||||
static KEYPAIRS: LazyLock<Vec<Keypair>> =
|
||||
LazyLock::new(|| generate_deterministic_keypairs(MAX_VALIDATOR_COUNT));
|
||||
|
||||
async fn get_harness<E: EthSpec>(
|
||||
epoch_offset: u64,
|
||||
|
||||
Reference in New Issue
Block a user