mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
* Some renames
* Fix
* Fix build for new APIs
* Remove diener
* Fixes
* Fixes
* Fix integration tests
* Fixes
* fix nis issuance
* Update Cargo.toml
* Polkadot doesn't have freezes/holds yet
* No networks use freezes/holds
* update lockfile for {"substrate"}
* Fix tests
There are more failing tests; just starting with the easy ones.
Reserved balance does not count towards ED anymore, therefore reducing
all the reserves by ED (1).
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixes for Polkadot pallets
* Fix parachains benchmarks
* Update Substrate
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -69,6 +69,7 @@ where
|
||||
<T as frame_system::Config>::RuntimeOrigin: From<crate::Origin>,
|
||||
{
|
||||
let config = Configuration::<T>::config();
|
||||
let ed = T::Currency::minimum_balance();
|
||||
let deposit: BalanceOf<T> = config.hrmp_sender_deposit.unique_saturated_into();
|
||||
let capacity = config.hrmp_channel_max_capacity;
|
||||
let message_size = config.hrmp_channel_max_message_size;
|
||||
@@ -83,10 +84,10 @@ where
|
||||
|
||||
// Make both a parachain if they are already not.
|
||||
if !Paras::<T>::is_parachain(sender) {
|
||||
register_parachain_with_balance::<T>(sender, deposit);
|
||||
register_parachain_with_balance::<T>(sender, deposit + ed);
|
||||
}
|
||||
if !Paras::<T>::is_parachain(recipient) {
|
||||
register_parachain_with_balance::<T>(recipient, deposit);
|
||||
register_parachain_with_balance::<T>(recipient, deposit + ed);
|
||||
}
|
||||
|
||||
assert_ok!(Hrmp::<T>::hrmp_init_open_channel(
|
||||
@@ -147,9 +148,10 @@ frame_benchmarking::benchmarks! {
|
||||
let recipient_id: ParaId = 2u32.into();
|
||||
|
||||
// make sure para is registered, and has enough balance.
|
||||
let ed = T::Currency::minimum_balance();
|
||||
let deposit: BalanceOf<T> = Configuration::<T>::config().hrmp_sender_deposit.unique_saturated_into();
|
||||
register_parachain_with_balance::<T>(sender_id, deposit);
|
||||
register_parachain_with_balance::<T>(recipient_id, deposit);
|
||||
register_parachain_with_balance::<T>(sender_id, deposit + ed);
|
||||
register_parachain_with_balance::<T>(recipient_id, deposit + ed);
|
||||
|
||||
let capacity = Configuration::<T>::config().hrmp_channel_max_capacity;
|
||||
let message_size = Configuration::<T>::config().hrmp_channel_max_message_size;
|
||||
@@ -302,12 +304,13 @@ frame_benchmarking::benchmarks! {
|
||||
let recipient_id: ParaId = 2u32.into();
|
||||
|
||||
// make sure para is registered, and has enough balance.
|
||||
let ed = T::Currency::minimum_balance();
|
||||
let sender_deposit: BalanceOf<T> =
|
||||
Configuration::<T>::config().hrmp_sender_deposit.unique_saturated_into();
|
||||
let recipient_deposit: BalanceOf<T> =
|
||||
Configuration::<T>::config().hrmp_recipient_deposit.unique_saturated_into();
|
||||
register_parachain_with_balance::<T>(sender_id, sender_deposit);
|
||||
register_parachain_with_balance::<T>(recipient_id, recipient_deposit);
|
||||
register_parachain_with_balance::<T>(sender_id, sender_deposit + ed);
|
||||
register_parachain_with_balance::<T>(recipient_id, recipient_deposit + ed);
|
||||
|
||||
let capacity = Configuration::<T>::config().hrmp_channel_max_capacity;
|
||||
let message_size = Configuration::<T>::config().hrmp_channel_max_message_size;
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{GenesisBuild, ValidatorSet, ValidatorSetWithIdentification},
|
||||
traits::{ConstU32, GenesisBuild, ValidatorSet, ValidatorSetWithIdentification},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_support_test::TestRandomness;
|
||||
@@ -113,11 +113,11 @@ impl frame_system::Config for Test {
|
||||
type SystemWeightInfo = ();
|
||||
type SS58Prefix = ();
|
||||
type OnSetCode = ();
|
||||
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
||||
type MaxConsumers = ConstU32<16>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static ExistentialDeposit: u64 = 0;
|
||||
pub static ExistentialDeposit: u64 = 1;
|
||||
}
|
||||
|
||||
impl pallet_balances::Config for Test {
|
||||
@@ -130,6 +130,10 @@ impl pallet_balances::Config for Test {
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
type WeightInfo = ();
|
||||
type HoldIdentifier = ();
|
||||
type FreezeIdentifier = ();
|
||||
type MaxHolds = ConstU32<0>;
|
||||
type MaxFreezes = ConstU32<0>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user