Revert "Revert "add genesis stake placeholders (#6969)" (#7109)" (#7124)

This reverts commit 702f7cc51d.
This commit is contained in:
Rob Walker
2019-11-25 15:11:55 -08:00
committed by GitHub
parent acbe89a159
commit ef64f00cbb
18 changed files with 1322 additions and 105 deletions

View File

@ -15,13 +15,14 @@ solana_sdk::declare_id!("StorageMiningPoo111111111111111111111111111");
// to cut down on collisions for redemptions, we make multiple accounts
pub const NUM_REWARDS_POOLS: usize = 32;
pub fn add_genesis_accounts(genesis_config: &mut GenesisConfig) {
pub fn add_genesis_accounts(genesis_config: &mut GenesisConfig) -> u64 {
let mut pubkey = id();
for _i in 0..NUM_REWARDS_POOLS {
genesis_config.add_rewards_pool(pubkey, create_rewards_pool());
pubkey = Pubkey::new(hash(pubkey.as_ref()).as_ref());
}
0 // didn't consume any lamports
}
pub fn random_id() -> Pubkey {