add rent reserve for bootstrap stakes (#6876)
* genesis investor stakes * assert rent is sufficient for these bootstrappers
This commit is contained in:
@ -319,10 +319,18 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
|
||||
let bootstrap_leader_vote_account =
|
||||
vote_state::create_account(&bootstrap_vote_pubkey, &bootstrap_leader_pubkey, 0, 1);
|
||||
|
||||
let rent = Rent {
|
||||
lamports_per_byte_year: value_t_or_exit!(matches, "lamports_per_byte_year", u64),
|
||||
exemption_threshold: value_t_or_exit!(matches, "rent_exemption_threshold", f64),
|
||||
burn_percent: value_t_or_exit!(matches, "rent_burn_percentage", u8),
|
||||
};
|
||||
|
||||
let bootstrap_leader_stake_account = stake_state::create_account(
|
||||
&bootstrap_leader_pubkey,
|
||||
&bootstrap_vote_pubkey,
|
||||
&bootstrap_leader_vote_account,
|
||||
&rent,
|
||||
bootstrap_leader_stake_lamports,
|
||||
);
|
||||
|
||||
@ -352,12 +360,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
value_t_or_exit!(matches, "target_signatures_per_slot", usize),
|
||||
);
|
||||
|
||||
let rent = Rent {
|
||||
lamports_per_byte_year: value_t_or_exit!(matches, "lamports_per_byte_year", u64),
|
||||
exemption_threshold: value_t_or_exit!(matches, "rent_exemption_threshold", f64),
|
||||
burn_percent: value_t_or_exit!(matches, "rent_burn_percentage", u8),
|
||||
};
|
||||
|
||||
let mut poh_config = PohConfig::default();
|
||||
poh_config.target_tick_duration =
|
||||
Duration::from_millis(value_t_or_exit!(matches, "target_tick_duration", u64));
|
||||
|
Reference in New Issue
Block a user