Fix fragile tests in prep of stake rewrite pr (#13654)

* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!
This commit is contained in:
Ryo Onodera
2020-11-20 17:21:03 +09:00
committed by GitHub
parent 2cb006fa44
commit b74d7b5758
7 changed files with 34 additions and 24 deletions

View File

@@ -55,14 +55,15 @@ fn sort_stakes(stakes: &mut Vec<(Pubkey, u64)>) {
mod tests {
use super::*;
use solana_runtime::genesis_utils::{
create_genesis_config_with_leader, BOOTSTRAP_VALIDATOR_LAMPORTS,
bootstrap_validator_stake_lamports, create_genesis_config_with_leader,
BOOTSTRAP_VALIDATOR_LAMPORTS,
};
#[test]
fn test_leader_schedule_via_bank() {
let pubkey = solana_sdk::pubkey::new_rand();
let genesis_config =
create_genesis_config_with_leader(0, &pubkey, BOOTSTRAP_VALIDATOR_LAMPORTS)
create_genesis_config_with_leader(0, &pubkey, bootstrap_validator_stake_lamports())
.genesis_config;
let bank = Bank::new(&genesis_config);
@@ -86,7 +87,7 @@ mod tests {
let genesis_config = create_genesis_config_with_leader(
BOOTSTRAP_VALIDATOR_LAMPORTS,
&pubkey,
BOOTSTRAP_VALIDATOR_LAMPORTS,
bootstrap_validator_stake_lamports(),
)
.genesis_config;
let bank = Bank::new(&genesis_config);