diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 2c774997..9946079b 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -41,9 +41,9 @@ use tangle_runtime::BlockNumber; // Runtime #[cfg(not(feature = "testnet"))] -use tangle_runtime::{AccountId, Balance, Hash, Index}; +use tangle_runtime::{AccountId, Balance, Hash, Index, PalletServicesConstraints}; #[cfg(feature = "testnet")] -use tangle_testnet_runtime::{AccountId, Balance, Hash, Index}; +use tangle_testnet_runtime::{AccountId, Balance, Hash, Index, PalletServicesConstraints}; pub mod eth; pub mod tracing; diff --git a/pallets/tangle-lst/src/lib.rs b/pallets/tangle-lst/src/lib.rs index 50a3a8f4..757fb344 100644 --- a/pallets/tangle-lst/src/lib.rs +++ b/pallets/tangle-lst/src/lib.rs @@ -748,7 +748,10 @@ pub mod pallet { UnbondingMembers::::try_mutate( member_account.clone(), |member| -> DispatchResult { - let member = member.get_or_insert_with(Default::default); + let member = member.get_or_insert_with(|| PoolMember { + pool_id, + unbonding_eras: Default::default(), + }); member .unbonding_eras .try_insert(unbond_era, points_unbonded) diff --git a/pallets/tangle-lst/src/types/pools.rs b/pallets/tangle-lst/src/types/pools.rs index d14e1e2c..aa0499e4 100644 --- a/pallets/tangle-lst/src/types/pools.rs +++ b/pallets/tangle-lst/src/types/pools.rs @@ -10,7 +10,6 @@ use super::*; CloneNoBound, frame_support::PartialEqNoBound, )] -#[cfg_attr(feature = "std", derive(DefaultNoBound))] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] pub struct PoolMember { diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index 917bbb92..80407f5c 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -1266,9 +1266,9 @@ impl pallet_multi_asset_delegation::Config for Runtime { } parameter_types! { - pub static PostUnbondingPoolsWindow: u32 = 2; - pub static MaxMetadataLen: u32 = 2; - pub static CheckLevel: u8 = 255; + pub const PostUnbondingPoolsWindow: u32 = 2; + pub const MaxMetadataLen: u32 = 2; + pub const CheckLevel: u8 = 255; pub const LstPalletId: PalletId = PalletId(*b"py/tnlst"); } diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index 1913ef46..c9539f80 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -1220,9 +1220,9 @@ impl pallet_proxy::Config for Runtime { } parameter_types! { - pub static PostUnbondingPoolsWindow: u32 = 2; - pub static MaxMetadataLen: u32 = 2; - pub static CheckLevel: u8 = 255; + pub const PostUnbondingPoolsWindow: u32 = 2; + pub const MaxMetadataLen: u32 = 2; + pub const CheckLevel: u8 = 255; pub const LstPalletId: PalletId = PalletId(*b"py/tnlst"); }