Rename Client methods to match proposed BanksClient (bp #10793) (#10800)

* Rename Client methods to match proposed BanksClient (#10793)

(cherry picked from commit 7ade330b23)

# Conflicts:
#	programs/bpf/tests/programs.rs
#	runtime/benches/bank.rs

* Fix merge

Co-authored-by: Greg Fitzgerald <greg@solana.com>
This commit is contained in:
mergify[bot]
2020-06-25 05:33:12 +00:00
committed by GitHub
parent 0ee4a5e799
commit 85750307aa
23 changed files with 209 additions and 157 deletions

View File

@ -30,15 +30,28 @@ pub trait Client: SyncClient + AsyncClient {
pub trait SyncClient {
/// Create a transaction from the given message, and send it to the
/// server, retrying as-needed.
fn send_message<T: Signers>(&self, keypairs: &T, message: Message) -> Result<Signature>;
fn send_and_confirm_message<T: Signers>(
&self,
keypairs: &T,
message: Message,
) -> Result<Signature>;
/// Create a transaction from a single instruction that only requires
/// a single signer. Then send it to the server, retrying as-needed.
fn send_instruction(&self, keypair: &Keypair, instruction: Instruction) -> Result<Signature>;
fn send_and_confirm_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
) -> Result<Signature>;
/// Transfer lamports from `keypair` to `pubkey`, retrying until the
/// transfer completes or produces and error.
fn transfer(&self, lamports: u64, keypair: &Keypair, pubkey: &Pubkey) -> Result<Signature>;
fn transfer_and_confirm(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
) -> Result<Signature>;
/// Get an account or None if not found.
fn get_account_data(&self, pubkey: &Pubkey) -> Result<Option<Vec<u8>>>;