create_genesis_block() now returns a struct (#4403)

This commit is contained in:
Michael Vines
2019-05-22 20:39:00 -07:00
committed by GitHub
parent 7ada8510c4
commit 2ed77b040a
27 changed files with 308 additions and 132 deletions

View File

@ -1,17 +1,14 @@
pub use solana_runtime::genesis_utils::{
create_genesis_block_with_leader, BOOTSTRAP_LEADER_LAMPORTS,
create_genesis_block_with_leader, GenesisBlockInfo, BOOTSTRAP_LEADER_LAMPORTS,
};
use solana_sdk::genesis_block::GenesisBlock;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Keypair;
// same as genesis_block::create_genesis_block, but with bootstrap_leader staking logic
// for the core crate tests
pub fn create_genesis_block(mint_lamports: u64) -> (GenesisBlock, Keypair) {
let (genesis_block, mint_keypair, _vote_keypair) = create_genesis_block_with_leader(
pub fn create_genesis_block(mint_lamports: u64) -> GenesisBlockInfo {
create_genesis_block_with_leader(
mint_lamports,
&Pubkey::new_rand(),
BOOTSTRAP_LEADER_LAMPORTS,
);
(genesis_block, mint_keypair)
)
}