genesis validators (#7235)
* genesis validators * slp1 nodes get 500SOL * no commission
This commit is contained in:
@ -36,6 +36,10 @@ impl Default for StakeState {
|
||||
}
|
||||
|
||||
impl StakeState {
|
||||
pub fn get_rent_exempt_reserve(rent: &Rent) -> u64 {
|
||||
rent.minimum_balance(std::mem::size_of::<StakeState>())
|
||||
}
|
||||
|
||||
// utility function, used by Stakes, tests
|
||||
pub fn from(account: &Account) -> Option<StakeState> {
|
||||
account.state().ok()
|
||||
@ -801,10 +805,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_stake_rent_exempt_reserve(rent: &Rent) -> u64 {
|
||||
rent.minimum_balance(std::mem::size_of::<StakeState>())
|
||||
}
|
||||
|
||||
// genesis investor accounts
|
||||
pub fn create_lockup_stake_account(
|
||||
authorized: &Authorized,
|
||||
|
@ -12,6 +12,7 @@ use solana_sdk::{
|
||||
hash::Hash,
|
||||
instruction::InstructionError,
|
||||
pubkey::Pubkey,
|
||||
rent::Rent,
|
||||
slot_hashes::SlotHash,
|
||||
sysvar::clock::Clock,
|
||||
};
|
||||
@ -121,6 +122,10 @@ impl VoteState {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_rent_exempt_reserve(rent: &Rent) -> u64 {
|
||||
rent.minimum_balance(VoteState::size_of())
|
||||
}
|
||||
|
||||
pub fn size_of() -> usize {
|
||||
// Upper limit on the size of the Vote State. Equal to
|
||||
// size_of(VoteState) when votes.len() is MAX_LOCKOUT_HISTORY
|
||||
|
Reference in New Issue
Block a user