Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Referenda benchmark assert fix #12866

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frame/referenda/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ benchmarks_instance_pallet! {
verify {
assert_matches!(ReferendumInfoFor::<T, I>::get(index), Some(ReferendumInfo::Cancelled(_, None, _)));
let new_balance = T::Currency::free_balance(&caller);
assert!(new_balance > balance);
// the deposit is zero or make sure it was unreserved.
assert!(T::SubmissionDeposit::get().is_zero() || new_balance > balance);
}

cancel {
Expand Down