new tests based on new ghost-network functinality

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky
2025-06-03 20:41:51 +03:00
parent 46d4716f67
commit 573e57dfb4
5 changed files with 97 additions and 10 deletions

View File

@@ -2,15 +2,13 @@
use frame_support::{
derive_impl, parameter_types,
traits::{ConstU32, ConstU64},
weights::Weight,
PalletId,
traits::{ConstU32, ConstU64}, weights::Weight,
};
use frame_system::EnsureRoot;
use pallet_session::historical as pallet_session_historical;
use sp_runtime::{
testing::{TestXt, UintAuthorityId},
traits::ConvertInto,
traits::ConvertInto, curve::PiecewiseLinear,
Permill,
};
use sp_staking::{
@@ -176,9 +174,20 @@ impl ghost_networks::Config for Runtime {
type WeightInfo = ();
}
pallet_staking_reward_curve::build! {
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
min_inflation: 0_006_000,
max_inflation: 1_000_000,
ideal_stake: 0_690_000,
falloff: 0_050_000,
max_piece_count: 100,
test_precision: 0_005_000,
);
}
parameter_types! {
pub static ExistentialDeposit: u64 = 2;
pub const TreasuryPalletId: PalletId = PalletId(*b"mck/test");
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]