Update beacon node crates for new SSZ

This commit is contained in:
Paul Hauner
2019-05-13 12:07:32 +10:00
parent d9bfbc2657
commit eb62b5842d
8 changed files with 129 additions and 89 deletions

View File

@@ -5,7 +5,7 @@ use grpcio::{RpcContext, RpcStatus, RpcStatusCode, UnarySink};
use protos::services::{ActiveValidator, GetDutiesRequest, GetDutiesResponse, ValidatorDuty};
use protos::services_grpc::ValidatorService;
use slog::{trace, warn};
use ssz::decode;
use ssz::Decodable;
use std::sync::Arc;
use types::{Epoch, EthSpec, RelativeEpoch};
@@ -74,7 +74,7 @@ impl<B: EthSpec> ValidatorService for ValidatorServiceInstance<B> {
for validator_pk in validators.get_public_keys() {
let mut active_validator = ActiveValidator::new();
let public_key = match decode::<PublicKey>(validator_pk) {
let public_key = match PublicKey::from_ssz_bytes(validator_pk) {
Ok(v) => v,
Err(_) => {
let log_clone = self.log.clone();