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

@ -438,11 +438,13 @@ mod tests {
let sk1 = Pubkey::new_rand();
let pk1 = Pubkey::new_rand();
let mut vote_account1 = vote_state::create_account(&pk1, &Pubkey::new_rand(), 0, 100);
let stake_account1 = stake_state::create_account(&sk1, &pk1, &vote_account1, 100);
let stake_account1 =
stake_state::create_account(&sk1, &pk1, &vote_account1, &genesis_config.rent, 100);
let sk2 = Pubkey::new_rand();
let pk2 = Pubkey::new_rand();
let mut vote_account2 = vote_state::create_account(&pk2, &Pubkey::new_rand(), 0, 50);
let stake_account2 = stake_state::create_account(&sk2, &pk2, &vote_account2, 50);
let stake_account2 =
stake_state::create_account(&sk2, &pk2, &vote_account2, &genesis_config.rent, 50);
genesis_config.accounts.extend(vec![
(pk1, vote_account1.clone()),