From 33843f824a3cc31ce40a36430cb8a4a8da901336 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2019 00:05:39 -0700 Subject: [PATCH] Bootstrap leader's stake is now authorized to the bootstrap leader's identity key (#6571) (#6574) (cherry picked from commit 68acfd36d04144e2257f3a630444040ea744a884) --- genesis/src/main.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/genesis/src/main.rs b/genesis/src/main.rs index e7c01f9f18..edab8efd6d 100644 --- a/genesis/src/main.rs +++ b/genesis/src/main.rs @@ -310,16 +310,16 @@ fn main() -> Result<(), Box> { let bootstrap_storage_keypair = read_keypair_file(bootstrap_storage_keypair_file)?; let mint_keypair = read_keypair_file(mint_keypair_file)?; - let vote_account = vote_state::create_account( + let bootstrap_leader_vote_account = vote_state::create_account( &bootstrap_vote_keypair.pubkey(), &bootstrap_leader_keypair.pubkey(), 0, 1, ); - let stake_account = stake_state::create_account( - &bootstrap_stake_keypair.pubkey(), + let bootstrap_leader_stake_account = stake_state::create_account( + &bootstrap_leader_keypair.pubkey(), &bootstrap_vote_keypair.pubkey(), - &vote_account, + &bootstrap_leader_vote_account, bootstrap_leader_stake_lamports, ); @@ -335,9 +335,15 @@ fn main() -> Result<(), Box> { Account::new(bootstrap_leader_lamports, 0, &system_program::id()), ), // where votes go to - (bootstrap_vote_keypair.pubkey(), vote_account), + ( + bootstrap_vote_keypair.pubkey(), + bootstrap_leader_vote_account, + ), // passive bootstrap leader stake - (bootstrap_stake_keypair.pubkey(), stake_account), + ( + bootstrap_stake_keypair.pubkey(), + bootstrap_leader_stake_account, + ), ( bootstrap_storage_keypair.pubkey(), storage_contract::create_validator_storage_account(