Use MAX associated const (#9196)

* Use MAX associated const
This commit is contained in:
Squirrel
2021-06-24 11:53:49 +01:00
committed by GitHub
parent 09d9c2c9f6
commit ea1f21a904
56 changed files with 178 additions and 178 deletions
@@ -118,13 +118,13 @@ benchmarks! {
// Create s existing "seconds"
for i in 0 .. s {
let seconder = funded_account::<T>("seconder", i);
Democracy::<T>::second(RawOrigin::Signed(seconder).into(), 0, u32::max_value())?;
Democracy::<T>::second(RawOrigin::Signed(seconder).into(), 0, u32::MAX)?;
}
let deposits = Democracy::<T>::deposit_of(0).ok_or("Proposal not created")?;
assert_eq!(deposits.0.len(), (s + 1) as usize, "Seconds not recorded");
whitelist_account!(caller);
}: _(RawOrigin::Signed(caller), 0, u32::max_value())
}: _(RawOrigin::Signed(caller), 0, u32::MAX)
verify {
let deposits = Democracy::<T>::deposit_of(0).ok_or("Proposal not created")?;
assert_eq!(deposits.0.len(), (s + 2) as usize, "`second` benchmark did not work");
@@ -609,7 +609,7 @@ benchmarks! {
let caller = funded_account::<T>("caller", 0);
whitelist_account!(caller);
}: _(RawOrigin::Signed(caller), proposal_hash.clone(), u32::max_value())
}: _(RawOrigin::Signed(caller), proposal_hash.clone(), u32::MAX)
verify {
let proposal_hash = T::Hashing::hash(&encoded_proposal[..]);
assert!(!Preimages::<T>::contains_key(proposal_hash));