* 500_000_000MM SOL

* fixup
This commit is contained in:
Rob Walker
2019-12-08 14:36:09 -08:00
committed by GitHub
parent 48a085c28f
commit 0d6fca5abc
3 changed files with 41 additions and 32 deletions

View File

@@ -322,7 +322,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
)
.get_matches();
let faucet_lamports = value_t!(matches, "faucet_lamports", u64);
let faucet_lamports = value_t!(matches, "faucet_lamports", u64).unwrap_or(0);
let ledger_path = PathBuf::from(matches.value_of("ledger_path").unwrap());
let bootstrap_leader_lamports = value_t_or_exit!(matches, "bootstrap_leader_lamports", u64);
let bootstrap_leader_stake_lamports =
@@ -447,7 +447,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
if let Some(faucet_pubkey) = faucet_pubkey {
genesis_config.add_account(
faucet_pubkey,
Account::new(faucet_lamports.unwrap(), 0, &system_program::id()),
Account::new(faucet_lamports, 0, &system_program::id()),
);
}
@@ -461,7 +461,13 @@ fn main() -> Result<(), Box<dyn error::Error>> {
}
}
add_genesis_accounts(&mut genesis_config);
let issued_lamports = genesis_config
.accounts
.iter()
.map(|(_key, account)| account.lamports)
.sum::<u64>();
add_genesis_accounts(&mut genesis_config, issued_lamports - faucet_lamports);
create_new_ledger(&ledger_path, &genesis_config)?;