diff --git a/Cargo.lock b/Cargo.lock index 293549e068..e1c031db30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7728,6 +7728,7 @@ dependencies = [ name = "pallet-balances" version = "37.0.0" dependencies = [ + "array-bytes", "docify", "frame-benchmarking", "frame-support", diff --git a/ahm-controller/src/lib.rs b/ahm-controller/src/lib.rs index 5e7be114ad..743d2ed1da 100644 --- a/ahm-controller/src/lib.rs +++ b/ahm-controller/src/lib.rs @@ -121,10 +121,10 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(_: BlockNumberFor) -> Weight { + fn on_initialize(now: BlockNumberFor) -> Weight { match T::Role::get() { Role::Relay => { - Self::relay_on_init(); + Self::relay_on_init(now); }, Role::AssetHub => { }, @@ -146,7 +146,11 @@ pub mod pallet { } impl Pallet { - fn relay_on_init() { + fn relay_on_init(now: BlockNumberFor) { + if now < 3u32.into() { + return; + } + // Phase init let phase = match Phase::::get() { None => Phases::MigrateBalancesEds { next_account: None }, @@ -199,9 +203,11 @@ pub mod pallet { fn do_migrate_eds(next_acc: Option>) -> Result>, ()> { frame_support::storage::transactional::with_transaction_opaque_err::>, (), _>(|| { - let Some((next_key, call, weight)) = pallet_balances::Pallet::::migrate_ed(next_acc, 100) else { + let Some((next_key, call, weight)) = pallet_balances::Pallet::::migrate_ed(next_acc, 5000) else { return TransactionOutcome::Commit(Ok(None)); }; + + // Issue: Inbound Downward message was too long let ah_call: xcm::DoubleEncoded<()> = AssetHubPalletConfig::::Balances( call,