Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots committed May 8, 2024
1 parent ec9d555 commit ab4ad8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
7 changes: 0 additions & 7 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6659,13 +6659,6 @@ impl Bank {
Some(epoch_accounts_hash)
}

/// Return the epoch_reward_status field on the bank to serialize
/// Returns none if we are NOT in the reward interval.
pub(crate) fn get_epoch_reward_status_to_serialize(&self) -> Option<&EpochRewardStatus> {
matches!(self.epoch_reward_status, EpochRewardStatus::Active(_))
.then_some(&self.epoch_reward_status)
}

/// Convenience fn to get the Epoch Accounts Hash
pub fn epoch_accounts_hash(&self) -> Option<EpochAccountsHash> {
self.rc
Expand Down
8 changes: 3 additions & 5 deletions runtime/src/bank/serde_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,9 @@ mod tests {
// Defaults to 0
assert_eq!(0, dbank.fee_rate_governor.lamports_per_signature);

// epoch_reward status should default to `Inactive`
let epoch_reward_status = dbank
.get_epoch_reward_status_to_serialize()
.unwrap_or(&EpochRewardStatus::Inactive);
assert_matches!(epoch_reward_status, EpochRewardStatus::Inactive);
// The snapshot epoch_reward_status always equals `None`, so the bank
// field should default to `Inactive`
assert_eq!(dbank.epoch_reward_status, EpochRewardStatus::Inactive);
}

#[cfg(RUSTC_WITH_SPECIALIZATION)]
Expand Down

0 comments on commit ab4ad8a

Please sign in to comment.