Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Remove storage of HasherKind
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Jan 19, 2024
1 parent 5897110 commit 9d29d34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/program/src/epoch_rewards_partition_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ pub enum EpochRewardsPartitionDataVersion {
V0(PartitionData),
}

impl EpochRewardsPartitionDataVersion {
pub fn get_hasher_kind(&self) -> HasherKind {
match self {
EpochRewardsPartitionDataVersion::V0(_) => HasherKind::Sip13,
}
}
}

#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
pub enum HasherKind {
Sip13,
Expand All @@ -24,8 +32,6 @@ pub struct PartitionData {
pub num_partitions: usize,
/// Blockhash of the last block of the previous epoch, used to create EpochRewardsHasher
pub parent_blockhash: Hash,
/// Kind of hasher used to generate partitions
pub hasher_kind: HasherKind,
}

pub fn get_epoch_rewards_partition_data_address(epoch: u64) -> Pubkey {
Expand Down

0 comments on commit 9d29d34

Please sign in to comment.