diff --git a/pallets/dactr/src/extensions/check_batch_transactions.rs b/pallets/dactr/src/extensions/check_batch_transactions.rs index e03f23df3..d83dad270 100644 --- a/pallets/dactr/src/extensions/check_batch_transactions.rs +++ b/pallets/dactr/src/extensions/check_batch_transactions.rs @@ -66,32 +66,10 @@ where pub fn get_scheduler_call(&self) -> Option<&::RuntimeCall> { match self.0.is_sub_type() { - Some(SchedulerCall::::schedule { - call, - when: _, - maybe_periodic: _, - priority: _, - }) - | Some(SchedulerCall::::schedule_after { - after: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named { - id: _, - when: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named_after { - id: _, - after: _, - maybe_periodic: _, - priority: _, - call, - }) => Some(call), + Some(SchedulerCall::::schedule { call, .. }) + | Some(SchedulerCall::::schedule_after { call, .. }) + | Some(SchedulerCall::::schedule_named { call, .. }) + | Some(SchedulerCall::::schedule_named_after { call, .. }) => Some(call), _ => None, } } @@ -107,31 +85,16 @@ where pub fn get_as_multi_call(&self) -> Option<&::RuntimeCall> { match self.0.is_sub_type() { - Some(MultisigCall::::as_multi { - call, - threshold: _, - other_signatories: _, - maybe_timepoint: _, - max_weight: _, - }) - | Some(MultisigCall::as_multi_threshold_1 { - other_signatories: _, - call, - }) => { - // - Some(call) - }, + Some(MultisigCall::::as_multi { call, .. }) + | Some(MultisigCall::as_multi_threshold_1 { call, .. }) => Some(call), _ => None, } } pub fn get_proxy_call(&self) -> Option<&::RuntimeCall> { match self.0.is_sub_type() { - Some(ProxyCall::::proxy { - call, - real: _, - force_proxy_type: _, - }) => Some(call), + Some(ProxyCall::::proxy { call, .. }) => Some(call), + Some(ProxyCall::::proxy_announced { call, .. }) => Some(call), _ => None, } } @@ -272,12 +235,10 @@ where let call: &::RuntimeCall = call.into_ref(); let call = WrappedCall::(call); - if iteration > 1 || inside_batch { - ensure!( - !call.is_send_message_call(), - InvalidTransaction::Custom(UnexpectedSendMessageCall as u8) - ); - } + ensure!( + !call.is_send_message_call(), + InvalidTransaction::Custom(UnexpectedSendMessageCall as u8) + ); if let Some(call) = call.get_proxy_call() { return Self::recursive_proxy_call(call, iteration + 1, inside_batch); @@ -310,21 +271,20 @@ where return Err(InvalidTransaction::Custom(MaxRecursionExceeded as u8).into()); } - if iteration > 1 || inside_batch { - match call.is_sub_type() { - Some(VectorCall::::send_message { .. }) => { - return Err(InvalidTransaction::Custom(UnexpectedSendMessageCall as u8).into()) - }, - _ => (), - } + match call.is_sub_type() { + Some(VectorCall::::send_message { .. }) => { + return Err(InvalidTransaction::Custom(UnexpectedSendMessageCall as u8).into()) + }, + _ => (), } match call.is_sub_type() { - Some(ProxyCall::::proxy { - call, - real: _, - force_proxy_type: _, - }) => return Self::recursive_proxy_call(call, iteration + 1, inside_batch), + Some(ProxyCall::::proxy { call, .. }) => { + return Self::recursive_proxy_call(call, iteration + 1, inside_batch) + }, + Some(ProxyCall::::proxy_announced { call, .. }) => { + return Self::recursive_proxy_call(call, iteration + 1, inside_batch) + }, _ => (), } @@ -338,49 +298,18 @@ where } match call.is_sub_type() { - Some(MultisigCall::::as_multi { - call, - threshold: _, - other_signatories: _, - maybe_timepoint: _, - max_weight: _, - }) - | Some(MultisigCall::as_multi_threshold_1 { - other_signatories: _, - call, - }) => { + Some(MultisigCall::::as_multi { call, .. }) + | Some(MultisigCall::as_multi_threshold_1 { call, .. }) => { return Self::recursive_multisig_call(call, iteration + 1, inside_batch); }, _ => (), } match call.is_sub_type() { - Some(SchedulerCall::::schedule { - call, - when: _, - maybe_periodic: _, - priority: _, - }) - | Some(SchedulerCall::::schedule_after { - after: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named { - id: _, - when: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named_after { - id: _, - after: _, - maybe_periodic: _, - priority: _, - call, - }) => { + Some(SchedulerCall::::schedule { call, .. }) + | Some(SchedulerCall::::schedule_after { call, .. }) + | Some(SchedulerCall::::schedule_named { call, .. }) + | Some(SchedulerCall::::schedule_named_after { call, .. }) => { return Self::recursive_scheduler_call(call, iteration + 1, inside_batch); }, _ => (), @@ -409,11 +338,12 @@ where } match call.is_sub_type() { - Some(ProxyCall::::proxy { - call, - real: _, - force_proxy_type: _, - }) => return Self::recursive_proxy_call(call, iteration + 1, inside_batch), + Some(ProxyCall::::proxy { call, .. }) => { + return Self::recursive_proxy_call(call, iteration + 1, inside_batch) + }, + Some(ProxyCall::::proxy_announced { call, .. }) => { + return Self::recursive_proxy_call(call, iteration + 1, inside_batch) + }, _ => (), } @@ -427,49 +357,18 @@ where } match call.is_sub_type() { - Some(MultisigCall::::as_multi { - call, - threshold: _, - other_signatories: _, - maybe_timepoint: _, - max_weight: _, - }) - | Some(MultisigCall::as_multi_threshold_1 { - other_signatories: _, - call, - }) => { + Some(MultisigCall::::as_multi { call, .. }) + | Some(MultisigCall::as_multi_threshold_1 { call, .. }) => { return Self::recursive_multisig_call(call, iteration + 1, inside_batch); }, _ => (), } match call.is_sub_type() { - Some(SchedulerCall::::schedule { - call, - when: _, - maybe_periodic: _, - priority: _, - }) - | Some(SchedulerCall::::schedule_after { - after: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named { - id: _, - when: _, - maybe_periodic: _, - priority: _, - call, - }) - | Some(SchedulerCall::::schedule_named_after { - id: _, - after: _, - maybe_periodic: _, - priority: _, - call, - }) => { + Some(SchedulerCall::::schedule { call, .. }) + | Some(SchedulerCall::::schedule_after { call, .. }) + | Some(SchedulerCall::::schedule_named { call, .. }) + | Some(SchedulerCall::::schedule_named_after { call, .. }) => { return Self::recursive_scheduler_call(call, iteration + 1, inside_batch); }, _ => (), diff --git a/runtime/src/transaction_filter.rs b/runtime/src/transaction_filter.rs index f7c89f102..7c10e92d1 100644 --- a/runtime/src/transaction_filter.rs +++ b/runtime/src/transaction_filter.rs @@ -36,12 +36,7 @@ impl HeaderExtensionDataFilter for Runtime { let (final_call, nb_iterations) = extract_final_call(&unchecked_extrinsic.function); if nb_iterations > 0 { - match final_call { - Call::Vector(call) => { - filter_vector_call(failed_transactions, maybe_caller, call, block, tx_index) - }, - _ => None, - } + None } else { match final_call { Call::Vector(call) => { diff --git a/runtime/src/version.rs b/runtime/src/version.rs index 699864887..a0e04f7f9 100644 --- a/runtime/src/version.rs +++ b/runtime/src/version.rs @@ -17,7 +17,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // Per convention: if the runtime behavior changes, increment spec_version // and set impl_version to 0. This paramenter is typically incremented when // there's an update to the transaction_version. - spec_version: 50, + spec_version: 51, // The version of the implementation of the specification. Nodes can ignore this. It is only // used to indicate that the code is different. As long as the authoring_version and the // spec_version are the same, the code itself might have changed, but the native and Wasm