Correct warnings
This commit is contained in:
parent
1eafa63c2a
commit
69442a2ab3
@ -2,9 +2,7 @@ use crate::{ApiError, ApiResult};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use bls::PublicKey;
|
||||
use hex;
|
||||
use hyper::{Body, Request, StatusCode};
|
||||
use serde::de::value::StringDeserializer;
|
||||
use serde_json::Deserializer;
|
||||
use hyper::{Body, Request};
|
||||
use store::{iter::AncestorIter, Store};
|
||||
use types::{BeaconState, EthSpec, Hash256, RelativeEpoch, Slot};
|
||||
|
||||
|
@ -64,7 +64,7 @@ impl<'a> UrlQuery<'a> {
|
||||
/// Returns a vector of all values present where `key` is in `keys
|
||||
///
|
||||
/// If no match is found, an `InvalidQueryParams` error is returned.
|
||||
pub fn all_of(mut self, key: &str) -> Result<Vec<String>, ApiError> {
|
||||
pub fn all_of(self, key: &str) -> Result<Vec<String>, ApiError> {
|
||||
let queries: Vec<_> = self
|
||||
.0
|
||||
.filter_map(|(k, v)| {
|
||||
|
@ -5,9 +5,8 @@ use bls::PublicKey;
|
||||
use hyper::{Body, Request};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
use store::Store;
|
||||
use types::beacon_state::EthSpec;
|
||||
use types::{BeaconBlock, BeaconState, Epoch, RelativeEpoch, Shard, Slot};
|
||||
use types::{Epoch, RelativeEpoch, Shard, Slot};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct ValidatorDuty {
|
||||
@ -61,7 +60,7 @@ pub fn get_validator_duties<T: BeaconChainTypes + 'static>(req: Request<Body>) -
|
||||
))
|
||||
})?;
|
||||
//TODO: Handle an array of validators, currently only takes one
|
||||
let mut validators: Vec<PublicKey> = match query.all_of("validator_pubkeys") {
|
||||
let validators: Vec<PublicKey> = match query.all_of("validator_pubkeys") {
|
||||
Ok(v) => v
|
||||
.iter()
|
||||
.map(|pk| parse_pubkey(pk))
|
||||
|
Loading…
Reference in New Issue
Block a user