forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky test_transaction_result_does_not_affect_bankhash (solana-la…
- Loading branch information
Showing
3 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
pub use solana_runtime::genesis_utils::{ | ||
bootstrap_validator_stake_lamports, create_genesis_config_with_leader, GenesisConfigInfo, | ||
}; | ||
use { | ||
solana_runtime::genesis_utils::create_genesis_config_with_leader_with_mint_keypair, | ||
solana_sdk::{pubkey::Pubkey, signature::Keypair}, | ||
}; | ||
|
||
// same as genesis_config::create_genesis_config, but with bootstrap_validator staking logic | ||
// for the core crate tests | ||
pub fn create_genesis_config(mint_lamports: u64) -> GenesisConfigInfo { | ||
create_genesis_config_with_leader( | ||
mint_lamports, | ||
&solana_sdk::pubkey::new_rand(), | ||
&Pubkey::new_unique(), | ||
bootstrap_validator_stake_lamports(), | ||
) | ||
} | ||
|
||
pub fn create_genesis_config_with_mint_keypair( | ||
mint_keypair: Keypair, | ||
mint_lamports: u64, | ||
) -> GenesisConfigInfo { | ||
create_genesis_config_with_leader_with_mint_keypair( | ||
mint_keypair, | ||
mint_lamports, | ||
&Pubkey::new_unique(), | ||
bootstrap_validator_stake_lamports(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters