Update network and rpc to BeaconStateTypes

This commit is contained in:
Paul Hauner
2019-05-08 19:38:18 +10:00
parent 51dc97ee42
commit 42b7aa89d4
12 changed files with 70 additions and 60 deletions

View File

@@ -9,15 +9,15 @@ use protos::services_grpc::AttestationService;
use slog::{error, info, trace, warn};
use ssz::{ssz_encode, Decodable};
use std::sync::Arc;
use types::Attestation;
use types::{Attestation, BeaconStateTypes};
#[derive(Clone)]
pub struct AttestationServiceInstance {
pub chain: Arc<BeaconChain>,
pub struct AttestationServiceInstance<B: BeaconStateTypes> {
pub chain: Arc<BeaconChain<B>>,
pub log: slog::Logger,
}
impl AttestationService for AttestationServiceInstance {
impl<B: BeaconStateTypes> AttestationService for AttestationServiceInstance<B> {
/// Produce the `AttestationData` for signing by a validator.
fn produce_attestation_data(
&mut self,