Skip to content

Commit

Permalink
task: add integrity tests for BonusStatus update
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas committed Feb 13, 2025
1 parent 63eccf4 commit 7139686
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pallets/dapp-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,12 @@ pub mod pallet {
assert!(T::CycleConfiguration::eras_per_voting_subperiod() > 0);
assert!(T::CycleConfiguration::eras_per_build_and_earn_subperiod() > 0);
assert!(T::CycleConfiguration::blocks_per_era() > 0);

/// TODO: remove these checks once BonusStatus update is done
assert!(Self::max_call_weight().all_gte(Self::min_call_weight()));
assert!(Self::max_call_weight()
.all_lte(<T as frame_system::Config>::BlockWeights::get().max_block));
assert!(Self::update_weight_margin().all_lte(Self::min_call_weight()));
}

#[cfg(feature = "try-runtime")]
Expand Down

0 comments on commit 7139686

Please sign in to comment.