Tidy val client

This commit is contained in:
Paul Hauner
2019-11-23 20:42:07 +11:00
parent f62deb7934
commit 7991bbcc22
5 changed files with 187 additions and 119 deletions

View File

@@ -27,7 +27,7 @@ pub struct ValidatorStore<T, E: EthSpec> {
_phantom: PhantomData<E>,
}
impl<T: SlotClock + Clone + 'static, E: EthSpec> ValidatorStore<T, E> {
impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
pub fn load_from_disk(
base_dir: PathBuf,
spec: ChainSpec,
@@ -171,8 +171,8 @@ impl<T: SlotClock + Clone + 'static, E: EthSpec> ValidatorStore<T, E> {
&self,
validator_pubkey: &PublicKey,
validator_committee_position: usize,
mut attestation: Attestation<E>,
) -> Option<Attestation<E>> {
attestation: &mut Attestation<E>,
) -> Option<()> {
// TODO: check for slashing.
self.validators
.read()
@@ -196,7 +196,7 @@ impl<T: SlotClock + Clone + 'static, E: EthSpec> ValidatorStore<T, E> {
})
.ok()?;
Some(attestation)
Some(())
})
}
}