From 26ff00f97d438998672918e69dec3e791347027c Mon Sep 17 00:00:00 2001 From: imstar15 Date: Fri, 21 Apr 2023 09:32:50 +0800 Subject: [PATCH] Fix AutoCompoundDelegatedStake task (#352) --- pallets/automation-time/src/benchmarking.rs | 1 - .../src/migrations/upgrade_xcmp_task_struct.rs | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pallets/automation-time/src/benchmarking.rs b/pallets/automation-time/src/benchmarking.rs index ee0f0750a..7547e0b44 100644 --- a/pallets/automation-time/src/benchmarking.rs +++ b/pallets/automation-time/src/benchmarking.rs @@ -587,7 +587,6 @@ benchmarks! { delegator: account_id.clone(), collator: account_id.clone(), account_minimum: 100u32.into(), - frequency: 11, }, }; OldAccountTasks::::insert(account_id.clone(), task_id, task); diff --git a/pallets/automation-time/src/migrations/upgrade_xcmp_task_struct.rs b/pallets/automation-time/src/migrations/upgrade_xcmp_task_struct.rs index f5859a2fb..1536cd737 100644 --- a/pallets/automation-time/src/migrations/upgrade_xcmp_task_struct.rs +++ b/pallets/automation-time/src/migrations/upgrade_xcmp_task_struct.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use crate::{ - weights::WeightInfo, AccountOf, ActionOf, BalanceOf, Config, Schedule, Seconds, TaskId, TaskOf, + weights::WeightInfo, AccountOf, ActionOf, BalanceOf, Config, Schedule, TaskId, TaskOf, }; use codec::{Decode, Encode}; use cumulus_primitives_core::ParaId; @@ -51,7 +51,6 @@ pub enum OldAction { delegator: T::AccountId, collator: T::AccountId, account_minimum: BalanceOf, - frequency: Seconds, }, DynamicDispatch { encoded_call: Vec, @@ -61,9 +60,8 @@ pub enum OldAction { impl From> for ActionOf { fn from(action: OldAction) -> Self { match action { - OldAction::AutoCompoundDelegatedStake { - delegator, collator, account_minimum, .. - } => Self::AutoCompoundDelegatedStake { delegator, collator, account_minimum }, + OldAction::AutoCompoundDelegatedStake { delegator, collator, account_minimum } => + Self::AutoCompoundDelegatedStake { delegator, collator, account_minimum }, OldAction::Notify { message } => Self::Notify { message }, OldAction::NativeTransfer { sender, recipient, amount } => Self::NativeTransfer { sender, recipient, amount },