Rename KeypairUtil to Signer (#8360)

automerge
This commit is contained in:
Tyera Eulberg 2020-02-20 14:28:55 -07:00 committed by GitHub
parent ec5c02cb7f
commit ab361a8073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
108 changed files with 138 additions and 140 deletions

View File

@ -36,7 +36,7 @@ use solana_sdk::{
commitment_config::CommitmentConfig,
hash::Hash,
message::Message,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
timing::timestamp,
transaction::Transaction,
transport::TransportError,

View File

@ -12,7 +12,7 @@ use solana_core::{
cluster_info::{Node, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
};
use solana_sdk::{commitment_config::CommitmentConfig, signature::KeypairUtil};
use solana_sdk::{commitment_config::CommitmentConfig, signature::Signer};
use std::{net::SocketAddr, path::PathBuf, process::exit, sync::Arc};
fn main() {

View File

@ -15,7 +15,7 @@ use solana_sdk::{
client::{Client, SyncClient},
commitment_config::CommitmentConfig,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
timing::{duration_as_ms, duration_as_s},
transaction::Transaction,
{system_instruction, system_program},

View File

@ -5,7 +5,7 @@ pub mod order_book;
use crate::bench::{airdrop_lamports, create_client_accounts_file, do_bench_exchange, Config};
use log::*;
use solana_core::gossip_service::{discover_cluster, get_multi_client};
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signer;
fn main() {
solana_logger::setup();

View File

@ -10,7 +10,7 @@ use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
use solana_runtime::bank::Bank;
use solana_runtime::bank_client::BankClient;
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::process::exit;
use std::sync::mpsc::channel;
use std::time::Duration;

View File

@ -15,7 +15,7 @@ use solana_sdk::{
fee_calculator::FeeCalculator,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction, system_transaction,
timing::{duration_as_ms, duration_as_s, duration_as_us, timestamp},
transaction::Transaction,

View File

@ -4,7 +4,7 @@ use solana_bench_tps::cli;
use solana_core::gossip_service::{discover_cluster, get_client, get_multi_client};
use solana_genesis::Base64Account;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_program;
use std::{collections::HashMap, fs::File, io::prelude::*, path::Path, process::exit, sync::Arc};

View File

@ -8,7 +8,7 @@ use solana_faucet::faucet::run_local_faucet;
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
#[cfg(feature = "move")]
use solana_sdk::move_loader::solana_move_loader_program;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::sync::{mpsc::channel, Arc};
use std::time::Duration;

View File

@ -22,7 +22,7 @@ Each CTF test starts with an opaque entry point and a funded keypair. The test s
```text
use crate::contact_info::ContactInfo;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
pub fn test_this_behavior(
entry_point_info: &ContactInfo,
funding_keypair: &Keypair,

View File

@ -81,7 +81,7 @@ mod tests {
use solana_ledger::get_tmp_ledger_path;
use solana_sdk::hash::{hash, Hash, Hasher};
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
use std::fs::remove_file;
use std::fs::File;

View File

@ -6,7 +6,7 @@ use solana_sdk::{
clock::UnixTimestamp,
native_token::sol_to_lamports,
pubkey::Pubkey,
signature::{read_keypair_file, Keypair, KeypairUtil, Signature},
signature::{read_keypair_file, Keypair, Signature, Signer},
};
use std::str::FromStr;

View File

@ -3,8 +3,7 @@ use bip39::{Language, Mnemonic, Seed};
use clap::values_t;
use rpassword::prompt_password_stderr;
use solana_sdk::signature::{
keypair_from_seed, keypair_from_seed_phrase_and_passphrase, read_keypair_file, Keypair,
KeypairUtil,
keypair_from_seed, keypair_from_seed_phrase_and_passphrase, read_keypair_file, Keypair, Signer,
};
use std::{
error,

View File

@ -36,7 +36,7 @@ use solana_sdk::{
native_token::lamports_to_sol,
program_utils::DecodeError,
pubkey::Pubkey,
signature::{keypair_from_seed, Keypair, KeypairUtil, Signature},
signature::{keypair_from_seed, Keypair, Signature, Signer},
system_instruction::{self, create_address_with_seed, SystemError, MAX_ADDRESS_SEED_LEN},
system_transaction,
transaction::{Transaction, TransactionError},
@ -1974,7 +1974,7 @@ impl FaucetKeypair {
}
}
impl KeypairUtil for FaucetKeypair {
impl Signer for FaucetKeypair {
/// Return the public key of the keypair used to sign votes
fn pubkey(&self) -> Pubkey {
self.transaction.message().account_keys[0]

View File

@ -21,7 +21,7 @@ use solana_sdk::{
epoch_schedule::Epoch,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
};
use std::{

View File

@ -13,7 +13,7 @@ use solana_sdk::{
hash::Hash,
nonce_state::{Meta, NonceState},
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction::{
advance_nonce_account, authorize_nonce_account, create_address_with_seed,
create_nonce_account, create_nonce_account_with_seed, withdraw_nonce_account, NonceError,

View File

@ -16,7 +16,7 @@ use solana_sdk::signature::{Keypair, Signature};
use solana_sdk::{
account_utils::StateMut,
pubkey::Pubkey,
signature::KeypairUtil,
signature::Signer,
system_instruction::{create_address_with_seed, SystemError},
sysvar::{
stake_history::{self, StakeHistory},
@ -1499,7 +1499,7 @@ mod tests {
use solana_sdk::{
fee_calculator::FeeCalculator,
hash::Hash,
signature::{keypair_from_seed, read_keypair_file, write_keypair, KeypairUtil},
signature::{keypair_from_seed, read_keypair_file, write_keypair, Signer},
};
use tempfile::NamedTempFile;

View File

@ -7,7 +7,7 @@ use solana_clap_utils::{input_parsers::*, input_validators::*};
use solana_client::rpc_client::RpcClient;
use solana_sdk::signature::Keypair;
use solana_sdk::{
account_utils::StateMut, message::Message, pubkey::Pubkey, signature::KeypairUtil,
account_utils::StateMut, message::Message, pubkey::Pubkey, signature::Signer,
system_instruction::SystemError, transaction::Transaction,
};
use solana_storage_program::storage_instruction::{self, StorageAccountType};

View File

@ -19,7 +19,7 @@ use solana_sdk::{
commitment_config::CommitmentConfig,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
transaction::Transaction,
};
use std::error;

View File

@ -9,7 +9,7 @@ use solana_sdk::{
account::Account,
pubkey::Pubkey,
signature::Keypair,
signature::KeypairUtil,
signature::Signer,
system_instruction::{create_address_with_seed, SystemError},
transaction::Transaction,
};

View File

@ -6,7 +6,7 @@ use solana_faucet::faucet::run_local_faucet;
use solana_sdk::{
hash::Hash,
pubkey::Pubkey,
signature::{read_keypair_file, write_keypair, Keypair, KeypairUtil},
signature::{read_keypair_file, write_keypair, Keypair, Signer},
system_instruction::create_address_with_seed,
system_program,
};

View File

@ -11,7 +11,7 @@ use solana_sdk::{
fee_calculator::FeeCalculator,
nonce_state::NonceState,
pubkey::Pubkey,
signature::{read_keypair_file, write_keypair, Keypair, KeypairUtil},
signature::{read_keypair_file, write_keypair, Keypair, Signer},
};
use std::fs::remove_dir_all;
use std::sync::mpsc::channel;

View File

@ -2,7 +2,7 @@ use solana_cli::cli::{process_command, CliCommand, CliConfig};
use solana_client::rpc_client::RpcClient;
use solana_core::validator::new_validator_for_tests;
use solana_faucet::faucet::run_local_faucet;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signer;
use std::fs::remove_dir_all;
use std::sync::mpsc::channel;

View File

@ -9,7 +9,7 @@ use solana_sdk::{
fee_calculator::FeeCalculator,
nonce_state::NonceState,
pubkey::Pubkey,
signature::{keypair_from_seed, read_keypair_file, write_keypair, Keypair, KeypairUtil},
signature::{keypair_from_seed, read_keypair_file, write_keypair, Keypair, Signer},
system_instruction::create_address_with_seed,
};
use solana_stake_program::stake_state::{Lockup, StakeAuthorize, StakeState};

View File

@ -9,7 +9,7 @@ use solana_sdk::{
fee_calculator::FeeCalculator,
nonce_state::NonceState,
pubkey::Pubkey,
signature::{keypair_from_seed, read_keypair_file, write_keypair, KeypairUtil},
signature::{keypair_from_seed, read_keypair_file, write_keypair, Signer},
};
use std::fs::remove_dir_all;
use std::sync::mpsc::channel;

View File

@ -17,7 +17,7 @@ use solana_sdk::{
message::Message,
packet::PACKET_DATA_SIZE,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
signers::Signers,
system_instruction,
timing::duration_as_ms,

View File

@ -21,8 +21,8 @@ use solana_sdk::genesis_config::GenesisConfig;
use solana_sdk::hash::Hash;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Keypair;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signature;
use solana_sdk::signature::Signer;
use solana_sdk::system_instruction;
use solana_sdk::system_transaction;
use solana_sdk::timing::{duration_as_us, timestamp};

View File

@ -3,7 +3,7 @@ extern crate test;
use solana_ledger::entry::{next_entry_mut, Entry, EntrySlice};
use solana_sdk::hash::{hash, Hash};
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
use test::Bencher;

View File

@ -9,7 +9,7 @@ use solana_ledger::shred::{
};
use solana_perf::test_tx;
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::sync::Arc;
use test::Bencher;

View File

@ -11,7 +11,7 @@ use solana_core::sigverify::TransactionSigVerifier;
use solana_core::sigverify_stage::SigVerifyStage;
use solana_perf::test_tx::test_tx;
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
use solana_sdk::timing::duration_as_ms;
use std::sync::mpsc::channel;

View File

@ -1026,7 +1026,7 @@ mod tests {
use solana_runtime::bank::HashAgeKind;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
transaction::TransactionError,
};

View File

@ -180,7 +180,7 @@ mod test {
use chrono::{DateTime, FixedOffset};
use serde_json::Value;
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
use std::collections::HashSet;
use std::path::PathBuf;

View File

@ -107,7 +107,7 @@ mod test {
use solana_ledger::create_new_tmp_ledger;
use solana_ledger::entry::{create_ticks, Entry};
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
use std::path::PathBuf;
use std::sync::mpsc::channel;

View File

@ -259,7 +259,7 @@ mod test {
use solana_runtime::bank::Bank;
use solana_sdk::hash::Hash;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::path::Path;
use std::sync::atomic::AtomicBool;
use std::sync::mpsc::channel;

View File

@ -362,7 +362,7 @@ mod test {
use solana_sdk::{
clock::Slot,
genesis_config::GenesisConfig,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use std::sync::{Arc, RwLock};
use std::time::Duration;

View File

@ -1891,7 +1891,7 @@ mod tests {
use crate::crds_value::CrdsValueLabel;
use rayon::prelude::*;
use solana_perf::test_tx::test_tx;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::collections::HashSet;
use std::net::{IpAddr, Ipv4Addr};
use std::sync::{Arc, RwLock};

View File

@ -84,7 +84,7 @@ impl ClusterInfoVoteListener {
mod tests {
use crate::packet;
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::transaction::Transaction;
use solana_vote_program::vote_instruction;
use solana_vote_program::vote_state::Vote;

View File

@ -481,7 +481,7 @@ pub mod test {
clock::Slot,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
transaction::Transaction,
};
use solana_vote_program::{vote_instruction, vote_state::Vote};

View File

@ -2,7 +2,7 @@ use solana_sdk::pubkey::Pubkey;
#[cfg(test)]
use solana_sdk::rpc_port;
#[cfg(test)]
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::timing::timestamp;
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
use std::net::{IpAddr, SocketAddr};

View File

@ -305,7 +305,7 @@ mod test {
use crate::contact_info::ContactInfo;
use bincode::deserialize;
use solana_perf::test_tx::test_tx;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::timing::timestamp;
#[test]

View File

@ -41,7 +41,7 @@ impl GenKeys {
mod tests {
use super::*;
pub use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signer;
use std::collections::HashSet;
#[test]

View File

@ -8,7 +8,7 @@ use solana_client::thin_client::{create_client, ThinClient};
use solana_ledger::bank_forks::BankForks;
use solana_perf::recycler::Recycler;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::net::{SocketAddr, TcpListener, UdpSocket};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::channel;

View File

@ -27,7 +27,7 @@ use solana_sdk::{
clock::Slot,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
timing::{self, duration_as_ms},
transaction::Transaction,
};
@ -1082,7 +1082,7 @@ pub(crate) mod tests {
instruction::InstructionError,
packet::PACKET_DATA_SIZE,
rent::Rent,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
system_transaction,
transaction::TransactionError,
};

View File

@ -1115,7 +1115,7 @@ pub mod tests {
hash::{hash, Hash},
instruction::InstructionError,
rpc_port,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
transaction::TransactionError,
};

View File

@ -288,7 +288,7 @@ mod tests {
use solana_runtime::bank::Bank;
use solana_sdk::{
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_program, system_transaction,
transaction::{self, Transaction},
};

View File

@ -181,7 +181,7 @@ mod tests {
};
use solana_ledger::get_tmp_ledger_path;
use solana_runtime::bank::Bank;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signer;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::sync::atomic::AtomicBool;

View File

@ -506,7 +506,7 @@ pub(crate) mod tests {
use jsonrpc_pubsub::typed::Subscriber;
use solana_budget_program;
use solana_sdk::{
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
};
use tokio::prelude::{Async, Stream};

View File

@ -14,7 +14,7 @@ use solana_metrics::{datapoint_debug, inc_new_counter_debug};
use solana_perf::packet::{Packets, PacketsRecycler};
use solana_sdk::{
clock::Slot,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
timing::duration_as_ms,
};
use std::{

View File

@ -76,7 +76,7 @@ pub mod tests {
use crate::packet::Packet;
use solana_ledger::shred::{Shred, Shredder};
use solana_runtime::bank::Bank;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
#[test]
fn test_sigverify_shreds_read_slots() {

View File

@ -20,7 +20,7 @@ use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
transaction::Transaction,
};
use solana_storage_program::{
@ -649,7 +649,7 @@ mod tests {
use rayon::prelude::*;
use solana_runtime::bank::Bank;
use solana_sdk::hash::Hasher;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::cmp::{max, min};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::mpsc::channel;

View File

@ -26,7 +26,7 @@ use solana_ledger::{
};
use solana_sdk::{
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use std::{
net::UdpSocket,

View File

@ -40,7 +40,7 @@ use solana_sdk::{
hash::Hash,
poh_config::PohConfig,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
timing::timestamp,
};
use std::{

View File

@ -494,7 +494,7 @@ mod test {
clock::Slot,
epoch_schedule::MINIMUM_SLOTS_PER_EPOCH,
hash::Hash,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use std::{
net::UdpSocket,

View File

@ -23,7 +23,7 @@ mod tests {
clock::Slot,
hash::hashv,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
};
use std::sync::RwLock;

View File

@ -7,7 +7,7 @@ use solana_core::{
validator::new_validator_for_tests,
};
use solana_sdk::{
commitment_config::CommitmentConfig, pubkey::Pubkey, rpc_port, signature::KeypairUtil,
commitment_config::CommitmentConfig, pubkey::Pubkey, rpc_port, signature::Signer,
system_transaction,
};
use std::{

View File

@ -6,7 +6,7 @@ use solana_core::cluster_info::{ClusterInfo, Node};
use solana_core::gossip_service::GossipService;
use solana_core::packet::Packet;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::timing::timestamp;
use std::net::UdpSocket;
use std::sync::atomic::{AtomicBool, Ordering};

View File

@ -15,7 +15,7 @@ mod tests {
use solana_sdk::hash::Hash;
use solana_sdk::message::Message;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::transaction::Transaction;
use solana_storage_program::storage_instruction;
use solana_storage_program::storage_instruction::StorageAccountType;

View File

@ -15,7 +15,7 @@ use solana_sdk::{
message::Message,
packet::PACKET_DATA_SIZE,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
transaction::Transaction,
};

View File

@ -3,7 +3,7 @@ use solana_sdk::{
hash::Hash,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
transaction::Transaction,
};

View File

@ -22,7 +22,7 @@ use solana_sdk::{
poh_config::PohConfig,
pubkey::Pubkey,
rent::Rent,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_program, timing,
};
use solana_stake_program::stake_state::{self, StakeState};

View File

@ -13,7 +13,7 @@ use solana_sdk::{
hash::{Hash, Hasher},
message::Message,
pubkey::Pubkey,
signature::{read_keypair_file, Keypair, KeypairUtil, Signable},
signature::{read_keypair_file, Keypair, Signable, Signer},
transaction::Transaction,
};
use std::{

View File

@ -19,7 +19,7 @@ use solana_sdk::{
pubkey::write_pubkey_file,
signature::{
keypair_from_seed, read_keypair, read_keypair_file, write_keypair, write_keypair_file,
Keypair, KeypairUtil,
Keypair, Signer,
},
};
use std::{
@ -54,7 +54,7 @@ fn check_for_overwrite(outfile: &str, matches: &ArgMatches) {
fn get_keypair_from_matches(
matches: &ArgMatches,
config: Config,
) -> Result<Box<dyn KeypairUtil>, Box<dyn error::Error>> {
) -> Result<Box<dyn Signer>, Box<dyn error::Error>> {
let mut path = dirs::home_dir().expect("home directory");
let path = if matches.is_present("keypair") {
matches.value_of("keypair").unwrap()

View File

@ -8,7 +8,7 @@ use solana_ledger::sigverify_shreds::{
};
use solana_perf::packet::{Packet, Packets};
use solana_perf::recycler_cache::RecyclerCache;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::sync::Arc;
use test::Bencher;

View File

@ -35,7 +35,7 @@ use solana_sdk::{
hash::Hash,
program_utils::limited_deserialize,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
timing::timestamp,
transaction::Transaction,
};

View File

@ -866,7 +866,7 @@ pub mod tests {
hash::Hash,
instruction::InstructionError,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
transaction::{Transaction, TransactionError},
};

View File

@ -457,7 +457,7 @@ mod tests {
use solana_sdk::{
hash::{hash, Hash},
message::Message,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
transaction::Transaction,
};

View File

@ -18,7 +18,7 @@ use solana_sdk::{
hash::Hash,
packet::PACKET_DATA_SIZE,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
};
use std::mem::size_of;
use std::{sync::Arc, time::Instant};

View File

@ -18,7 +18,7 @@ use solana_perf::{
use solana_rayon_threadlimit::get_thread_count;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Signature;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::sync::Arc;
use std::{collections::HashMap, mem::size_of};
@ -447,7 +447,7 @@ pub mod tests {
use super::*;
use crate::shred::SIZE_OF_DATA_SHRED_PAYLOAD;
use crate::shred::{Shred, Shredder};
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
#[test]
fn test_sigverify_shred_cpu() {
solana_logger::setup();

View File

@ -107,7 +107,7 @@ pub(crate) mod tests {
clock::Clock,
instruction::Instruction,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
signers::Signers,
sysvar::{
stake_history::{self, StakeHistory},

View File

@ -2,7 +2,7 @@ use solana_ledger::entry::Entry;
use solana_ledger::shred::{
max_entries_per_n_shred, verify_test_data_shred, Shred, Shredder, MAX_DATA_SHREDS_PER_FEC_BLOCK,
};
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::{hash::Hash, system_transaction};
use std::convert::TryInto;
use std::sync::Arc;

View File

@ -24,7 +24,7 @@ use solana_sdk::{
hash::Hash,
poh_config::PohConfig,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
system_transaction,
timing::duration_as_ms,
transport::TransportError,

View File

@ -20,7 +20,7 @@ use solana_sdk::{
message::Message,
poh_config::PohConfig,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_transaction,
transaction::Transaction,
};

View File

@ -15,7 +15,7 @@ use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
use solana_sdk::{
commitment_config::CommitmentConfig,
genesis_config::create_genesis_config,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use std::{
fs::remove_dir_all,

View File

@ -23,7 +23,7 @@ use solana_sdk::{
epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH},
genesis_config::OperatingMode,
poh_config::PohConfig,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use std::sync::atomic::{AtomicBool, Ordering};
use std::{

View File

@ -109,7 +109,7 @@ where
mod tests {
use super::*;
use solana_sdk::hash::Hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_transaction;
#[test]

View File

@ -1,6 +1,6 @@
use solana_sdk::hash::Hash;
use solana_sdk::instruction::CompiledInstruction;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_instruction::SystemInstruction;
use solana_sdk::system_program;
use solana_sdk::system_transaction;

View File

@ -33,7 +33,7 @@ mod bpf {
client::SyncClient,
instruction::{AccountMeta, Instruction, InstructionError},
pubkey::Pubkey,
signature::KeypairUtil,
signature::Signer,
transaction::TransactionError,
};
use std::{io::Read, sync::Arc};
@ -225,7 +225,7 @@ mod bpf {
clock::DEFAULT_SLOTS_PER_EPOCH,
instruction::{AccountMeta, Instruction, InstructionError},
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
sysvar::{clock, fees, rent, rewards, slot_hashes, stake_history},
transaction::TransactionError,
};

View File

@ -232,7 +232,7 @@ mod tests {
use solana_sdk::hash::hash;
use solana_sdk::instruction::InstructionError;
use solana_sdk::message::Message;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::transaction::TransactionError;
fn create_bank(lamports: u64) -> (Bank, Keypair) {

View File

@ -108,7 +108,7 @@ mod tests {
use serde_derive::{Deserialize, Serialize};
use solana_sdk::{
account::{create_keyed_is_signer_accounts, Account},
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction::SystemInstruction,
};
use std::cell::RefCell;

View File

@ -493,7 +493,7 @@ mod test {
use solana_sdk::client::SyncClient;
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::message::Message;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_instruction;
use std::mem;

View File

@ -5,7 +5,7 @@ use solana_sdk::client::SyncClient;
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::instruction::InstructionError;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::signature::Signer;
use solana_sdk::transaction::TransactionError;
#[test]

View File

@ -13,7 +13,7 @@ use solana_sdk::{
instruction::InstructionError,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
};

View File

@ -9,7 +9,7 @@ use solana_sdk::{
commitment_config::CommitmentConfig,
hash::Hash,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
transaction::Transaction,
};
@ -155,7 +155,7 @@ mod tests {
use solana_runtime::bank::Bank;
use solana_runtime::bank_client::BankClient;
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
use std::sync::Arc;
fn create_bank(lamports: u64) -> (Arc<Bank>, Keypair, Keypair, Pubkey, Pubkey) {

View File

@ -63,7 +63,7 @@ mod tests {
client::SyncClient,
genesis_config::create_genesis_config,
message::Message,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
system_program,
transport::Result,
};

View File

@ -153,7 +153,7 @@ mod tests {
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::hash::hash;
use solana_sdk::message::Message;
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
use solana_sdk::signature::{Keypair, Signature, Signer};
use solana_sdk::transaction::TransactionError;
use solana_sdk::transport::Result;
use std::sync::Arc;

View File

@ -6,7 +6,7 @@ use crate::{
};
use solana_sdk::{
pubkey::Pubkey,
signature::{KeypairUtil, Signature},
signature::{Signature, Signer},
};
use std::error;
@ -24,7 +24,7 @@ impl RemoteKeypair {
}
}
impl KeypairUtil for RemoteKeypair {
impl Signer for RemoteKeypair {
fn try_pubkey(&self) -> Result<Pubkey, Box<dyn error::Error>> {
match &self.wallet_type {
RemoteWalletType::Ledger(wallet) => wallet

View File

@ -12,7 +12,7 @@ use solana_sdk::{
genesis_config::create_genesis_config,
instruction::InstructionError,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
transaction::Transaction,
};
use std::{sync::Arc, thread::sleep, time::Duration};

View File

@ -681,7 +681,7 @@ mod tests {
message::Message,
nonce_state,
rent::Rent,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_program,
transaction::Transaction,
};

View File

@ -2455,7 +2455,7 @@ pub mod tests {
#[test]
fn test_bad_bank_hash() {
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
let db = AccountsDB::new(Vec::new());
let some_slot: Slot = 0;

View File

@ -166,7 +166,7 @@ impl<T: Clone> AccountsIndex<T> {
#[cfg(test)]
mod tests {
use super::*;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
#[test]
fn test_get_empty() {

View File

@ -2134,7 +2134,7 @@ mod tests {
nonce_state,
poh_config::PohConfig,
rent::Rent,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
system_program::{self, solana_system_program},
sysvar::{fees::Fees, rewards::Rewards},

View File

@ -8,7 +8,7 @@ use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
signers::Signers,
system_instruction,
transaction::{self, Transaction},

View File

@ -4,7 +4,7 @@ use solana_sdk::{
genesis_config::GenesisConfig,
pubkey::Pubkey,
rent::Rent,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_program::{self, solana_system_program},
};
use solana_stake_program::stake_state;

View File

@ -5,7 +5,7 @@ use solana_sdk::{
loader_instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
};

View File

@ -79,7 +79,7 @@ mod tests {
instruction::InstructionError,
nonce_state::{with_test_keyed_account, Meta, NonceAccount},
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction,
sysvar::{recent_blockhashes::create_test_recent_blockhashes, rent::Rent},
};

View File

@ -84,7 +84,7 @@ pub(crate) mod tests {
client::SyncClient,
genesis_config::create_genesis_config,
message::Message,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
};
use solana_storage_program::{
storage_contract::{StorageAccount, STORAGE_ACCOUNT_SPACE},

View File

@ -329,7 +329,7 @@ mod tests {
instruction::{AccountMeta, Instruction, InstructionError},
message::Message,
nonce_state,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction, system_program, sysvar,
transaction::TransactionError,
};

View File

@ -2,8 +2,7 @@ use solana_runtime::{
bank::Bank, bank_client::BankClient, loader_utils::create_invoke_instruction,
};
use solana_sdk::{
client::SyncClient, genesis_config::create_genesis_config, pubkey::Pubkey,
signature::KeypairUtil,
client::SyncClient, genesis_config::create_genesis_config, pubkey::Pubkey, signature::Signer,
};
#[test]

View File

@ -8,7 +8,7 @@ use solana_sdk::{
client::SyncClient,
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil},
signature::{Keypair, Signer},
system_instruction::create_address_with_seed,
sysvar::{self, stake_history::StakeHistory, Sysvar},
};

View File

@ -13,7 +13,7 @@ use solana_sdk::{
hash::{hash, Hash},
message::Message,
pubkey::Pubkey,
signature::{Keypair, KeypairUtil, Signature},
signature::{Keypair, Signature, Signer},
system_instruction,
sysvar::{
rewards::{self, Rewards},

View File

@ -8,7 +8,7 @@ use solana_sdk::{
instruction::CompiledInstruction as CompiledInstructionNative,
message::{Message as MessageNative, MessageHeader as MessageHeaderNative},
pubkey::Pubkey,
signature::{Keypair as KeypairNative, KeypairUtil, Signature as SignatureNative},
signature::{Keypair as KeypairNative, Signature as SignatureNative, Signer},
transaction::Transaction as TransactionNative,
};
use std::{
@ -501,7 +501,7 @@ mod tests {
use bincode::serialize;
use rand_chacha::ChaChaRng;
use rand_core::SeedableRng;
use solana_sdk::signature::{Keypair as KeypairNative, KeypairUtil};
use solana_sdk::signature::{Keypair as KeypairNative, Signer};
use solana_sdk::system_transaction;
#[test]

Some files were not shown because too many files have changed in this diff Show More