From ee693fb3e3942ad175cc5f441903795afdedcf16 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Sun, 31 Mar 2019 00:34:35 +1100 Subject: [PATCH] Add committe_len to gRPC parameters --- beacon_node/rpc/src/attestation.rs | 2 +- beacon_node/rpc/src/validator.rs | 1 + protos/src/services.proto | 1 + validator_client/src/duties/grpc.rs | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/beacon_node/rpc/src/attestation.rs b/beacon_node/rpc/src/attestation.rs index aec948abb..c6e5c68ee 100644 --- a/beacon_node/rpc/src/attestation.rs +++ b/beacon_node/rpc/src/attestation.rs @@ -6,7 +6,7 @@ use protos::services::{ ProduceAttestationDataResponse, PublishAttestationRequest, PublishAttestationResponse, }; use protos::services_grpc::AttestationService; -use slog::{error, info, trace, warn, Logger}; +use slog::{error, info, trace, warn}; use ssz::{ssz_encode, Decodable}; use std::sync::Arc; use types::Attestation; diff --git a/beacon_node/rpc/src/validator.rs b/beacon_node/rpc/src/validator.rs index a60cb4394..3dbbbdd17 100644 --- a/beacon_node/rpc/src/validator.rs +++ b/beacon_node/rpc/src/validator.rs @@ -167,6 +167,7 @@ impl ValidatorService for ValidatorServiceInstance { duty.set_committee_index(attestation_duties.committee_index as u64); duty.set_attestation_slot(attestation_duties.slot.as_u64()); duty.set_attestation_shard(attestation_duties.shard); + duty.set_committee_len(attestation_duties.committee_len as u64); active_validator.set_duty(duty); resp_validators.push(active_validator); diff --git a/protos/src/services.proto b/protos/src/services.proto index c5bd8a91d..ecc75ee26 100644 --- a/protos/src/services.proto +++ b/protos/src/services.proto @@ -125,6 +125,7 @@ message ValidatorDuty { uint64 attestation_slot = 3; uint64 attestation_shard = 4; uint64 committee_index = 5; + uint64 committee_len = 6; } /* diff --git a/validator_client/src/duties/grpc.rs b/validator_client/src/duties/grpc.rs index 954ee194e..58fb5c992 100644 --- a/validator_client/src/duties/grpc.rs +++ b/validator_client/src/duties/grpc.rs @@ -53,7 +53,7 @@ impl BeaconNodeDuties for ValidatorServiceClient { slot: Slot::from(active_duty.get_attestation_slot()), shard: active_duty.get_attestation_shard(), committee_index: active_duty.get_committee_index() as usize, - committee_len: 10, + committee_len: active_duty.get_committee_len() as usize, }; let epoch_duty = EpochDuty {