Expose last-valid-slot to BankClient and ThinClient users (#10478)

automerge
This commit is contained in:
Greg Fitzgerald
2020-06-09 18:07:32 -06:00
committed by GitHub
parent b250e8c614
commit 4131eee94d
10 changed files with 52 additions and 34 deletions

View File

@@ -160,7 +160,7 @@ fn distribute_tokens<T: Client>(
let fee_payer_pubkey = args.fee_payer.pubkey();
let message = Message::new_with_payer(&instructions, Some(&fee_payer_pubkey));
match client.send_message(message, &signers) {
Ok(transaction) => {
Ok((transaction, _last_valid_slot)) => {
db::set_transaction_info(
db,
&allocation.recipient.parse().unwrap(),
@@ -411,7 +411,7 @@ use tempfile::{tempdir, NamedTempFile};
pub fn test_process_distribute_tokens_with_client<C: Client>(client: C, sender_keypair: Keypair) {
let thin_client = ThinClient::new(client, false);
let fee_payer = Keypair::new();
let transaction = thin_client
let (transaction, _last_valid_slot) = thin_client
.transfer(sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey())
.unwrap();
thin_client
@@ -486,7 +486,7 @@ pub fn test_process_distribute_tokens_with_client<C: Client>(client: C, sender_k
pub fn test_process_distribute_stake_with_client<C: Client>(client: C, sender_keypair: Keypair) {
let thin_client = ThinClient::new(client, false);
let fee_payer = Keypair::new();
let transaction = thin_client
let (transaction, _last_valid_slot) = thin_client
.transfer(sol_to_lamports(1.0), &sender_keypair, &fee_payer.pubkey())
.unwrap();
thin_client