fix runtime for the benchmarking

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky 2026-08-31 15:06:47 +03:00
parent 99ac2f1f08
commit e104a49e53
Signed by: st1nky
GPG Key ID: 016064BD97603B40
2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "casper-runtime" name = "casper-runtime"
version = "4.0.0" version = "4.0.1"
build = "build.rs" build = "build.rs"
description = "Runtime of the Casper Network" description = "Runtime of the Casper Network"
edition.workspace = true edition.workspace = true

View File

@ -14,11 +14,15 @@ use frame_support::{
genesis_builder_helper::{build_state, get_preset}, genesis_builder_helper::{build_state, get_preset},
traits::{ traits::{
fungible::HoldConsideration, fungible::HoldConsideration,
tokens::{imbalance::ResolveTo, PayFromAccount, UnityAssetBalanceConversion}, tokens::{imbalance::ResolveTo, UnityAssetBalanceConversion},
ConstU128, ConstU32, InstanceFilter, KeyOwnerProofSystem, ConstU128, ConstU32, InstanceFilter, KeyOwnerProofSystem,
LinearStoragePrice, LinearStoragePrice,
}, },
}; };
#[cfg(not(feature = "runtime-benchmarks"))]
use frame_support::traits::tokens::PayFromAccount;
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use runtime_common::{ use runtime_common::{
impl_runtime_weights, impls::DealWithFees, prod_or_fast, BlockHashCount, BlockLength, impl_runtime_weights, impls::DealWithFees, prod_or_fast, BlockHashCount, BlockLength,
@ -577,8 +581,8 @@ impl EnsureOrigin<RuntimeOrigin> for RootSpendOrigin {
} }
#[cfg(feature = "runtime-benchmarks")] #[cfg(feature = "runtime-benchmarks")]
fn successful_origin() -> RuntimeOrigin { fn try_successful_origin() -> Result<RuntimeOrigin, ()> {
EnsureRoot::<AccountId>::successful_origin() EnsureRoot::<AccountId>::try_successful_origin()
} }
} }
@ -1054,7 +1058,6 @@ mod benches {
// that path resolves correctly in the generated file. // that path resolves correctly in the generated file.
// Substrate // Substrate
[pallet_alliance, Alliance]
[pallet_babe, Babe] [pallet_babe, Babe]
[pallet_bags_list, VoterList] [pallet_bags_list, VoterList]
[pallet_balances, Balances] [pallet_balances, Balances]
@ -1077,7 +1080,7 @@ mod benches {
// Ghosts // Ghosts
[ghost_nomination_pools, NominationPoolsBench::<Runtime>] [ghost_nomination_pools, NominationPoolsBench::<Runtime>]
[ghost_networks, GhostNetworks] [ghost_networks, GhostNetworks]
[ghost_claims, GhostClaims] [ghost_governance, GhostGovernance]
[ghost_weaver, GhostWeaver] [ghost_weaver, GhostWeaver]
[ghost_exodus, GhostExodus] [ghost_exodus, GhostExodus]
[ghost_sudo, GhostSudo] [ghost_sudo, GhostSudo]