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

pallet-tips | port to frame v2 #8205

Closed
Closed
Show file tree
Hide file tree
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
16 changes: 13 additions & 3 deletions frame/tips/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@
use super::*;

use frame_system::RawOrigin;
use frame_benchmarking::{benchmarks, account, whitelisted_caller, impl_benchmark_test_suite};
use frame_benchmarking::{
benchmarks,
account,
whitelisted_caller,
impl_benchmark_test_suite,
};
use frame_support::{
ensure,
};
use sp_runtime::{traits::{Saturating}};

use crate::Module as TipsMod;
use crate::Pallet as TipsMod;

const SEED: u32 = 0;

Expand Down Expand Up @@ -85,7 +93,8 @@ fn setup_pot_account<T: Config>() {
let _ = T::Currency::make_free_balance_be(&pot_account, value);
}

const MAX_BYTES: u32 = 16384;
// const MAX_BYTES: u32 = 16384;
const MAX_BYTES: u32 = 2;
const MAX_TIPPERS: u32 = 100;

benchmarks! {
Expand Down Expand Up @@ -191,6 +200,7 @@ benchmarks! {
let hash = T::Hashing::hash_of(&(&reason_hash, &beneficiary));
ensure!(Tips::<T>::contains_key(hash), "tip does not exist");
}: _(RawOrigin::Root, hash)

}

impl_benchmark_test_suite!(
Expand Down
Loading