Skip to content

Commit

Permalink
Fix testnet build (#749)
Browse files Browse the repository at this point in the history
* update types to 0.5.9

* fix testnet build
  • Loading branch information
1xstj authored Aug 30, 2024
1 parent 5486ca0 commit 7f6ffd9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions node/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion pallets/tangle-lst/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,10 @@ pub mod pallet {
UnbondingMembers::<T>::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)
Expand Down
1 change: 0 additions & 1 deletion pallets/tangle-lst/src/types/pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Config> {
Expand Down
6 changes: 3 additions & 3 deletions runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
6 changes: 3 additions & 3 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 7f6ffd9

Please sign in to comment.