Clean up `use` to keep rust 1.43.0 from complaining (#9740)
This commit is contained in:
parent
2f705b5b55
commit
c11abf88b7
|
@ -1,4 +1,3 @@
|
|||
use serde_json;
|
||||
use solana_client::client_error;
|
||||
use solana_ledger::blockstore;
|
||||
use solana_sdk::transport;
|
||||
|
|
|
@ -14,7 +14,6 @@ use crate::crds::Crds;
|
|||
use crate::crds_gossip::{get_stake, get_weight, CRDS_GOSSIP_DEFAULT_BLOOM_ITEMS};
|
||||
use crate::crds_gossip_error::CrdsGossipError;
|
||||
use crate::crds_value::{CrdsValue, CrdsValueLabel};
|
||||
use rand;
|
||||
use rand::distributions::{Distribution, WeightedIndex};
|
||||
use rand::Rng;
|
||||
use solana_runtime::bloom::Bloom;
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
//! The `poh_service` module implements a service that records the passing of
|
||||
//! "ticks", a measure of time in the PoH stream
|
||||
use crate::poh_recorder::PohRecorder;
|
||||
use core_affinity;
|
||||
use solana_sdk::clock::DEFAULT_TICKS_PER_SLOT;
|
||||
use solana_sdk::poh_config::PohConfig;
|
||||
use solana_sys_tuner;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread::{self, sleep, Builder, JoinHandle};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use atty;
|
||||
use std::process::exit;
|
||||
|
||||
fn press_enter() {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
use bip39::{Language, Mnemonic, MnemonicType, Seed};
|
||||
use bs58;
|
||||
use clap::{
|
||||
crate_description, crate_name, value_t, values_t_or_exit, App, AppSettings, Arg, ArgMatches,
|
||||
SubCommand,
|
||||
};
|
||||
use num_cpus;
|
||||
use solana_clap_utils::{
|
||||
keypair::{
|
||||
keypair_from_seed_phrase, prompt_passphrase, signer_from_path,
|
||||
|
|
|
@ -2,7 +2,6 @@ use clap::{
|
|||
crate_description, crate_name, value_t, value_t_or_exit, values_t_or_exit, App, Arg,
|
||||
ArgMatches, SubCommand,
|
||||
};
|
||||
use histogram;
|
||||
use serde_json::json;
|
||||
use solana_clap_utils::input_validators::is_slot;
|
||||
use solana_ledger::bank_forks::CompressionType;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::blockstore_meta;
|
||||
use bincode::{deserialize, serialize};
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use fs_extra;
|
||||
use log::*;
|
||||
pub use rocksdb::Direction as IteratorDirection;
|
||||
use rocksdb::{
|
||||
|
|
|
@ -26,7 +26,6 @@ use std::{
|
|||
use tar::Archive;
|
||||
use tempfile::TempDir;
|
||||
use thiserror::Error;
|
||||
use zstd;
|
||||
|
||||
pub const SNAPSHOT_STATUS_CACHE_FILE_NAME: &str = "status_cache";
|
||||
pub const TAR_SNAPSHOTS_DIR: &str = "snapshots";
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
use bytes::Bytes;
|
||||
use log::*;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::io;
|
||||
use std::net::SocketAddr;
|
||||
use std::time::Duration;
|
||||
use tokio;
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::prelude::*;
|
||||
use tokio::reactor::Handle;
|
||||
use tokio::runtime::Runtime;
|
||||
use std::{io, net::SocketAddr, time::Duration};
|
||||
use tokio::{net::TcpListener, prelude::*, reactor::Handle, runtime::Runtime};
|
||||
use tokio_codec::{BytesCodec, Decoder};
|
||||
|
||||
pub type IpEchoServer = Runtime;
|
||||
|
|
|
@ -4,7 +4,6 @@ use crate::spv_instruction::*;
|
|||
use crate::spv_state::*;
|
||||
#[allow(unused_imports)]
|
||||
use crate::utils::*;
|
||||
use hex;
|
||||
use log::*;
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
use clap;
|
||||
use clap::{App, Arg};
|
||||
use hex;
|
||||
use reqwest;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use clap;
|
||||
use clap::{App, Arg};
|
||||
use reqwest;
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
// pub type blockHash = [u8; 32];
|
||||
|
|
|
@ -11,33 +11,33 @@ pub trait Signers {
|
|||
}
|
||||
|
||||
macro_rules! default_keypairs_impl {
|
||||
() => (
|
||||
fn pubkeys(&self) -> Vec<Pubkey> {
|
||||
self.iter().map(|keypair| keypair.pubkey()).collect()
|
||||
}
|
||||
() => {
|
||||
fn pubkeys(&self) -> Vec<Pubkey> {
|
||||
self.iter().map(|keypair| keypair.pubkey()).collect()
|
||||
}
|
||||
|
||||
fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError> {
|
||||
let mut pubkeys = Vec::new();
|
||||
for keypair in self.iter() {
|
||||
pubkeys.push(keypair.try_pubkey()?);
|
||||
}
|
||||
Ok(pubkeys)
|
||||
fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError> {
|
||||
let mut pubkeys = Vec::new();
|
||||
for keypair in self.iter() {
|
||||
pubkeys.push(keypair.try_pubkey()?);
|
||||
}
|
||||
Ok(pubkeys)
|
||||
}
|
||||
|
||||
fn sign_message(&self, message: &[u8]) -> Vec<Signature> {
|
||||
self.iter()
|
||||
.map(|keypair| keypair.sign_message(message))
|
||||
.collect()
|
||||
}
|
||||
fn sign_message(&self, message: &[u8]) -> Vec<Signature> {
|
||||
self.iter()
|
||||
.map(|keypair| keypair.sign_message(message))
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn try_sign_message(&self, message: &[u8]) -> Result<Vec<Signature>, SignerError> {
|
||||
let mut signatures = Vec::new();
|
||||
for keypair in self.iter() {
|
||||
signatures.push(keypair.try_sign_message(message)?);
|
||||
}
|
||||
Ok(signatures)
|
||||
fn try_sign_message(&self, message: &[u8]) -> Result<Vec<Signature>, SignerError> {
|
||||
let mut signatures = Vec::new();
|
||||
for keypair in self.iter() {
|
||||
signatures.push(keypair.try_sign_message(message)?);
|
||||
}
|
||||
);
|
||||
Ok(signatures)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
impl<T: Signer> Signers for [&T] {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use bincode;
|
||||
use solana_sdk::{
|
||||
clock::Slot,
|
||||
commitment_config::CommitmentConfig,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use serde_json;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
|
|
Loading…
Reference in New Issue