automerge
This commit is contained in:
@@ -730,7 +730,7 @@ mod tests {
|
||||
let mut error_counters = ErrorCounters::default();
|
||||
|
||||
let instructions = vec![CompiledInstruction::new(0, &(), vec![0])];
|
||||
let tx = Transaction::new_with_compiled_instructions::<Keypair>(
|
||||
let tx = Transaction::new_with_compiled_instructions::<[&Keypair; 0]>(
|
||||
&[],
|
||||
&[],
|
||||
Hash::default(),
|
||||
|
@@ -9,6 +9,7 @@ use solana_sdk::{
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
signature::{Keypair, KeypairUtil, Signature},
|
||||
signers::Signers,
|
||||
system_instruction,
|
||||
transaction::{self, Transaction},
|
||||
transport::{Result, TransportError},
|
||||
@@ -42,13 +43,13 @@ impl AsyncClient for BankClient {
|
||||
Ok(signature)
|
||||
}
|
||||
|
||||
fn async_send_message(
|
||||
fn async_send_message<T: Signers>(
|
||||
&self,
|
||||
keypairs: &[&Keypair],
|
||||
keypairs: &T,
|
||||
message: Message,
|
||||
recent_blockhash: Hash,
|
||||
) -> io::Result<Signature> {
|
||||
let transaction = Transaction::new(&keypairs, message, recent_blockhash);
|
||||
let transaction = Transaction::new(keypairs, message, recent_blockhash);
|
||||
self.async_send_transaction(transaction)
|
||||
}
|
||||
|
||||
@@ -77,9 +78,9 @@ impl AsyncClient for BankClient {
|
||||
}
|
||||
|
||||
impl SyncClient for BankClient {
|
||||
fn send_message(&self, keypairs: &[&Keypair], message: Message) -> Result<Signature> {
|
||||
fn send_message<T: Signers>(&self, keypairs: &T, message: Message) -> Result<Signature> {
|
||||
let blockhash = self.bank.last_blockhash();
|
||||
let transaction = Transaction::new(&keypairs, message, blockhash);
|
||||
let transaction = Transaction::new(keypairs, message, blockhash);
|
||||
self.bank.process_transaction(&transaction)?;
|
||||
Ok(transaction.signatures.get(0).cloned().unwrap_or_default())
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ fn fill_epoch_with_votes(
|
||||
Some(&mint_pubkey),
|
||||
);
|
||||
assert!(bank_client
|
||||
.send_message(&[&mint_keypair, &vote_keypair], message)
|
||||
.send_message(&[mint_keypair, vote_keypair], message)
|
||||
.is_ok());
|
||||
}
|
||||
bank
|
||||
|
@@ -372,7 +372,7 @@ fn submit_proof(
|
||||
);
|
||||
|
||||
assert_matches!(
|
||||
bank_client.send_message(&[&mint_keypair, &storage_keypair], message),
|
||||
bank_client.send_message(&[mint_keypair, storage_keypair], message),
|
||||
Ok(_)
|
||||
);
|
||||
ProofStatus::Valid
|
||||
|
Reference in New Issue
Block a user