add rent reserve for bootstrap stakes (#6876)

* genesis investor stakes

* assert rent is sufficient for these bootstrappers
This commit is contained in:
Rob Walker
2019-11-12 12:33:40 -08:00
committed by GitHub
parent 73e3fc7c4f
commit bb00904fc8
6 changed files with 43 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ use solana_sdk::{
fee_calculator::FeeCalculator,
genesis_config::GenesisConfig,
pubkey::Pubkey,
rent::Rent,
signature::{Keypair, KeypairUtil},
system_program::{self, solana_system_program},
};
@@ -39,10 +40,13 @@ pub fn create_genesis_config_with_leader(
bootstrap_leader_stake_lamports,
);
let rent = Rent::free();
let stake_account = stake_state::create_account(
&staking_keypair.pubkey(),
&voting_keypair.pubkey(),
&vote_account,
&rent,
bootstrap_leader_stake_lamports,
);
@@ -77,6 +81,7 @@ pub fn create_genesis_config_with_leader(
accounts,
native_instruction_processors,
fee_calculator,
rent,
..GenesisConfig::default()
};