genesis validators (#7235)

* genesis validators

* slp1 nodes get 500SOL

* no commission
This commit is contained in:
Rob Walker
2019-12-03 20:44:02 -08:00
committed by GitHub
parent e1b7f40c2b
commit 369f37a0a4
7 changed files with 250 additions and 15 deletions

View File

@@ -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