From 9cff5f5d8edd2dd91edc46da15a78d04bf9b6b40 Mon Sep 17 00:00:00 2001
From: bgallois <benjamin@gallois.cc>
Date: Tue, 26 Dec 2023 14:48:08 +0100
Subject: [PATCH] fix overhead benchmark

---
 runtime/common/src/pallets_config.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs
index 6efcf29e3..a9eedceef 100644
--- a/runtime/common/src/pallets_config.rs
+++ b/runtime/common/src/pallets_config.rs
@@ -214,7 +214,10 @@ macro_rules! pallets_config {
             // does a filter on the call
             type OnChargeTransaction = OneshotAccount;
             type OperationalFeeMultiplier = frame_support::traits::ConstU8<5>;
+            #[cfg(not(feature = "runtime-benchmarks"))]
             type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>;
+            #[cfg(feature = "runtime-benchmarks")]
+            type WeightToFee = frame_support::weights::ConstantMultiplier::<u64, sp_core::ConstU64<0u64>>; // Necessary for overhead benchmarking until WeightToFee has a correct implementation
             type LengthToFee = common_runtime::fees::LengthToFeeImpl<Balance>;
             type FeeMultiplierUpdate = pallet_transaction_payment::ConstFeeMultiplier<FeeMultiplier>;
         }
-- 
GitLab