Skip to content

Commit

Permalink
#80 Added benchmarking method for add_registrar
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmishra2005 committed Jan 27, 2021
1 parent 6356bf6 commit 4267fe2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pallets/polkadex-identity-pallet/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,26 @@ use frame_benchmarking::{benchmarks, TrackedStorageKey, account};
use sp_core::H256;
const SEED: u32 = 0;

benchmarks! {
_ {}

add_registrar {
let account_id = account("registrar", 0, SEED);
}: _(RawOrigin::Root, account_id)

}

#[cfg(test)]
mod tests {
use super::*;
use crate::tests::{new_test_ext, Test};
use frame_support::assert_ok;

#[test]
fn test_benchmarks() {
new_test_ext().execute_with(|| {
assert_ok!(test_benchmark_add_registrar::<Test>());
});
}
}

0 comments on commit 4267fe2

Please sign in to comment.