From 61220e6ff2d081c1ddcc81ad19f768d4e46d2cde Mon Sep 17 00:00:00 2001 From: Shaun Wang Date: Thu, 27 Jul 2023 00:53:33 +1200 Subject: [PATCH] Fix benchmarks. --- pallets/xvm/src/benchmarking.rs | 3 ++- pallets/xvm/src/mock.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pallets/xvm/src/benchmarking.rs b/pallets/xvm/src/benchmarking.rs index e01342213..f416a4bc8 100644 --- a/pallets/xvm/src/benchmarking.rs +++ b/pallets/xvm/src/benchmarking.rs @@ -21,6 +21,7 @@ use super::*; use frame_benchmarking::v2::*; use parity_scale_codec::Encode; use sp_core::H160; +use sp_runtime::MultiAddress; #[benchmarks] mod benchmarks { @@ -51,7 +52,7 @@ mod benchmarks { }; let vm_id = VmId::Wasm; let source = whitelisted_caller(); - let target = whitelisted_caller::().encode(); + let target = MultiAddress::::Id(whitelisted_caller()).encode(); let input = vec![1, 2, 3]; #[block] diff --git a/pallets/xvm/src/mock.rs b/pallets/xvm/src/mock.rs index f080bcb5e..afc9898c1 100644 --- a/pallets/xvm/src/mock.rs +++ b/pallets/xvm/src/mock.rs @@ -33,7 +33,7 @@ use frame_support::{ use sp_core::{H160, H256}; use sp_runtime::{ testing::Header, - traits::{BlakeTwo256, IdentityLookup}, + traits::{AccountIdLookup, BlakeTwo256}, AccountId32, }; @@ -53,7 +53,7 @@ impl frame_system::Config for TestRuntime { type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; + type Lookup = AccountIdLookup; type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>;