mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Stuff
This commit is contained in:
@@ -2,7 +2,7 @@ use account_utils::validator_definitions::{PasswordStorage, ValidatorDefinition}
|
|||||||
use doppelganger_service::DoppelgangerService;
|
use doppelganger_service::DoppelgangerService;
|
||||||
use initialized_validators::InitializedValidators;
|
use initialized_validators::InitializedValidators;
|
||||||
use logging::crit;
|
use logging::crit;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::Mutex;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use signing_method::Error as SigningError;
|
use signing_method::Error as SigningError;
|
||||||
use signing_method::{SignableMessage, SigningContext, SigningMethod};
|
use signing_method::{SignableMessage, SigningContext, SigningMethod};
|
||||||
@@ -14,6 +14,7 @@ use std::marker::PhantomData;
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use task_executor::TaskExecutor;
|
use task_executor::TaskExecutor;
|
||||||
|
use tokio::sync::RwLock;
|
||||||
use tracing::{error, info, warn};
|
use tracing::{error, info, warn};
|
||||||
use types::{
|
use types::{
|
||||||
graffiti::GraffitiString, AbstractExecPayload, Address, AggregateAndProof, Attestation,
|
graffiti::GraffitiString, AbstractExecPayload, Address, AggregateAndProof, Attestation,
|
||||||
@@ -565,8 +566,8 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore for LighthouseValidatorS
|
|||||||
///
|
///
|
||||||
/// - Unknown.
|
/// - Unknown.
|
||||||
/// - Known, but with an unknown index.
|
/// - Known, but with an unknown index.
|
||||||
fn validator_index(&self, pubkey: &PublicKeyBytes) -> Option<u64> {
|
fn validator_index(&self, pubkey: &PublicKeyBytes) -> impl Future<Output = Option<u64>> {
|
||||||
self.validators.read().get_index(pubkey)
|
async { self.validators.read().await.get_index(pubkey) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns all voting pubkeys for all enabled validators.
|
/// Returns all voting pubkeys for all enabled validators.
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ pub trait ValidatorStore: Send + Sync {
|
|||||||
///
|
///
|
||||||
/// - Unknown.
|
/// - Unknown.
|
||||||
/// - Known, but with an unknown index.
|
/// - Known, but with an unknown index.
|
||||||
fn validator_index(&self, pubkey: &PublicKeyBytes) -> Option<u64>;
|
fn validator_index(&self, pubkey: &PublicKeyBytes) -> impl Future<Output = Option<u64>> + Sync;
|
||||||
|
|
||||||
/// Returns all voting pubkeys for all enabled validators.
|
/// Returns all voting pubkeys for all enabled validators.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user