comments and tests

This commit is contained in:
Hardhat Chad
2024-03-09 19:14:56 +00:00
parent ad1fda6427
commit 9e5c52faf2
9 changed files with 55 additions and 25 deletions

View File

@@ -12,8 +12,7 @@ use crate::{
TARGET_EPOCH_REWARDS, TREASURY,
};
/// Reset transitions the Ore program from one epoch to the next. It is the most complex instruction in the
/// Ore program and has three primary responsibilities including:
/// Reset transitions the Ore program from one epoch to the next. Its responsibilities include:
/// 1. Reset bus account rewards counters.
/// 2. Adjust the reward rate to stabilize inflation.
/// 3. Top up the treasury token account to backup claims.
@@ -167,6 +166,7 @@ mod tests {
let current_rate = 1000;
let new_rate =
calculate_new_reward_rate(current_rate, TARGET_EPOCH_REWARDS.saturating_sub(1_000_000));
println!("{:?} {:?}", new_rate, current_rate);
assert!(new_rate.gt(&current_rate));
}