CLI: Support offline fee payers (#8009) (#8164)

automerge
This commit is contained in:
mergify[bot]
2020-02-07 09:41:35 -08:00
committed by GitHub
parent 465d71a3a3
commit 235bd0a46b
6 changed files with 458 additions and 20 deletions

View File

@@ -27,6 +27,20 @@ pub fn create_genesis_config_with_leader(
mint_lamports: u64,
bootstrap_validator_pubkey: &Pubkey,
bootstrap_validator_stake_lamports: u64,
) -> GenesisConfigInfo {
create_genesis_config_with_leader_ex(
mint_lamports,
bootstrap_validator_pubkey,
bootstrap_validator_stake_lamports,
BOOTSTRAP_VALIDATOR_LAMPORTS,
)
}
pub fn create_genesis_config_with_leader_ex(
mint_lamports: u64,
bootstrap_validator_pubkey: &Pubkey,
bootstrap_validator_stake_lamports: u64,
bootstrap_validator_lamports: u64,
) -> GenesisConfigInfo {
let mint_keypair = Keypair::new();
let bootstrap_validator_voting_keypair = Keypair::new();
@@ -56,7 +70,7 @@ pub fn create_genesis_config_with_leader(
),
(
*bootstrap_validator_pubkey,
Account::new(BOOTSTRAP_VALIDATOR_LAMPORTS, 0, &system_program::id()),
Account::new(bootstrap_validator_lamports, 0, &system_program::id()),
),
(
bootstrap_validator_voting_keypair.pubkey(),