Skip to content
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
9 changes: 6 additions & 3 deletions frame/shielded-pool/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use frame_support::{
traits::{Currency, Get},
};
use frame_system::RawOrigin;
use sp_runtime::traits::AccountIdConversion;
use sp_runtime::traits::{AccountIdConversion, SaturatedConversion};

#[cfg(not(feature = "std"))]
extern crate alloc;
Expand All @@ -24,6 +24,7 @@ mod benchmarks {
use super::*;
use crate::FrameEncryptedMemo;
use crate::pallet::{Assets, HistoricPoseidonRoots, NextAssetId, PoolBalancePerAsset};
use pallet_relayer::RelayerInterface;
use sp_std::vec::Vec;

fn setup_benchmark_env<T: Config>() -> (T::AccountId, u32) {
Expand Down Expand Up @@ -112,7 +113,8 @@ mod benchmarks {
.unwrap();

let asset_id = 0u32;
let fee: BalanceOf<T> = 0u32.into();
// Must be >= T::Relayer::min_relay_fee() to pass the FeeTooLow check.
let fee: BalanceOf<T> = T::Relayer::min_relay_fee().saturated_into();

#[extrinsic_call]
private_transfer(
Expand Down Expand Up @@ -147,7 +149,8 @@ mod benchmarks {
let proof: BoundedVec<u8, ConstU32<512>> = vec![0u8; 128].try_into().unwrap();
let nullifier = Nullifier([4u8; 32]);

let fee: BalanceOf<T> = 0u32.into();
// Must be >= T::Relayer::min_relay_fee() to pass the FeeTooLow check.
let fee: BalanceOf<T> = T::Relayer::min_relay_fee().saturated_into();

#[extrinsic_call]
unshield(
Expand Down
Loading