program-test: Add warp tests for rent and stake rewards (#15136)

* program-test Add rent collection and stake rewards

* Improve tests to initialize vote state

* Update comment

* Update program-test/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>

* Review feedback

* cargo fmt

* Avoid using hard-coded slots in tests

* Make genesis_config private

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
Jon Cinque
2021-02-05 22:08:00 +01:00
committed by GitHub
parent fabecdc86c
commit c5be226821
5 changed files with 217 additions and 37 deletions

View File

@ -2,12 +2,10 @@ use {
solana_banks_client::BanksClient,
solana_program::{
account_info::AccountInfo, entrypoint::ProgramResult, hash::Hash, instruction::Instruction,
msg, pubkey::Pubkey, rent::Rent,
msg, pubkey::Pubkey, rent::Rent, system_instruction,
},
solana_program_test::{processor, ProgramTest},
solana_sdk::{
signature::Keypair, signature::Signer, system_instruction, transaction::Transaction,
},
solana_sdk::{signature::Keypair, signature::Signer, transaction::Transaction},
};
#[allow(clippy::unnecessary_wraps)]