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

Commit

Permalink
fix benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Aug 21, 2023
1 parent c227c7c commit 0fa3502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frame/multisig/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ benchmarks! {
let caller_key = frame_system::Account::<T>::hashed_key_for(&caller);
frame_benchmarking::benchmarking::add_to_whitelist(caller_key.into());
// Create the multi
}: approve_as_multi(RawOrigin::Signed(caller), s as u16, signatories, None, call_hash, Weight::zero())
}: approve_as_multi(RawOrigin::Signed(caller), s as u16, signatories, None, call_hash, Weight::zero(), Some(42u32.into()))
verify {
assert!(Multisigs::<T>::contains_key(multi_account_id, call_hash));
}
Expand Down Expand Up @@ -182,7 +182,7 @@ benchmarks! {
// Whitelist caller account from further DB operations.
let caller_key = frame_system::Account::<T>::hashed_key_for(&caller2);
frame_benchmarking::benchmarking::add_to_whitelist(caller_key.into());
}: approve_as_multi(RawOrigin::Signed(caller2), s as u16, signatories2, Some(timepoint), call_hash, Weight::zero())
}: approve_as_multi(RawOrigin::Signed(caller2), s as u16, signatories2, Some(timepoint), call_hash, Weight::zero(), None)
verify {
let multisig = Multisigs::<T>::get(multi_account_id, call_hash).ok_or("multisig not created")?;
assert_eq!(multisig.approvals.len(), 2);
Expand Down Expand Up @@ -222,7 +222,7 @@ benchmarks! {
let timepoint = Multisig::<T>::timepoint();
// Create the multi
let o = RawOrigin::Signed(caller.clone()).into();
Multisig::<T>::create_multisig_with_expiry(o, s as u16, signatories.clone(), None, call_hash, Weight::zero(), 3u32.into())?;
Multisig::<T>::approve_as_multi(o, s as u16, signatories.clone(), None, call_hash, Weight::zero(), Some(3u32.into()))?;
assert!(Multisigs::<T>::contains_key(&multi_account_id, call_hash));
// Multisig expires after block 3 so we proceed to block 4.
System::<T>::set_block_number(4u32.into());
Expand Down

0 comments on commit 0fa3502

Please sign in to comment.