From 920cd5285a60019c4848122a56c66754cc5138c2 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 5 Nov 2020 18:16:44 -0800 Subject: [PATCH] Revert "Include Rent in ProgramTest::start() output" This reverts commit c3d2d2134c93001566e1e56f691582f379b5ae55. --- program-test/src/lib.rs | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/program-test/src/lib.rs b/program-test/src/lib.rs index 66d598114..46e05fa70 100644 --- a/program-test/src/lib.rs +++ b/program-test/src/lib.rs @@ -395,14 +395,6 @@ impl Default for ProgramTest { } } -// Values returned by `ProgramTest::start` -pub struct StartOutputs { - pub banks_client: BanksClient, - pub payer: Keypair, - pub recent_blockhash: Hash, - pub rent: Rent, -} - impl ProgramTest { pub fn new( program_name: &str, @@ -552,7 +544,7 @@ impl ProgramTest { /// /// Returns a `BanksClient` interface into the test environment as well as a payer `Keypair` /// with SOL for sending transactions - pub async fn start(self) -> StartOutputs { + pub async fn start(self) -> (BanksClient, Keypair, Hash) { { use std::sync::Once; static ONCE: Once = Once::new(); @@ -571,8 +563,7 @@ impl ProgramTest { bootstrap_validator_stake_lamports, ); let mut genesis_config = gci.genesis_config; - let rent = Rent::default(); - genesis_config.rent = rent; + genesis_config.rent = Rent::default(); genesis_config.fee_rate_governor = solana_program::fee_calculator::FeeRateGovernor::default(); let payer = gci.mint_keypair; @@ -624,11 +615,6 @@ impl ProgramTest { .unwrap_or_else(|err| panic!("Failed to start banks client: {}", err)); let recent_blockhash = banks_client.get_recent_blockhash().await.unwrap(); - StartOutputs { - banks_client, - payer, - recent_blockhash, - rent, - } + (banks_client, payer, recent_blockhash) } }