Skip to content

Commit a8e64a0

Browse files
committed
cargo fmt
1 parent 181ffd8 commit a8e64a0

File tree

5 files changed

+26
-14
lines changed

5 files changed

+26
-14
lines changed

node/src/benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use crate::client::FullClient;
66

77
use node_subtensor_runtime as runtime;
8-
use node_subtensor_runtime::{pallet_subtensor, sudo_wrapper};
98
use node_subtensor_runtime::{check_nonce, transaction_payment_wrapper};
9+
use node_subtensor_runtime::{pallet_subtensor, sudo_wrapper};
1010
use runtime::{BalancesCall, SystemCall};
1111
use sc_cli::Result;
1212
use sc_client_api::BlockBackend;

node/src/mev_shield/author.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ where
374374
frame_system::CheckEra::<runtime::Runtime>::from(Era::Immortal),
375375
node_subtensor_runtime::check_nonce::CheckNonce::<runtime::Runtime>::from(nonce).into(),
376376
frame_system::CheckWeight::<runtime::Runtime>::new(),
377-
node_subtensor_runtime::sudo_wrapper::SudoTransactionExtension::<runtime::Runtime>::new(),
377+
node_subtensor_runtime::sudo_wrapper::SudoTransactionExtension::<runtime::Runtime>::new(
378+
),
378379
node_subtensor_runtime::transaction_payment_wrapper::ChargeTransactionPaymentWrapper::<
379380
runtime::Runtime,
380381
>::new(pallet_transaction_payment::ChargeTransactionPayment::<

runtime/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use core::num::NonZeroU64;
1212

1313
pub mod check_nonce;
1414
mod migrations;
15-
pub mod transaction_payment_wrapper;
1615
pub mod sudo_wrapper;
16+
pub mod transaction_payment_wrapper;
1717

1818
extern crate alloc;
1919

@@ -1160,9 +1160,9 @@ impl pallet_subtensor_swap::Config for Runtime {
11601160
type WeightInfo = pallet_subtensor_swap::weights::DefaultWeight<Runtime>;
11611161
}
11621162

1163+
use crate::sudo_wrapper::SudoTransactionExtension;
11631164
use crate::transaction_payment_wrapper::ChargeTransactionPaymentWrapper;
11641165
use sp_runtime::BoundedVec;
1165-
use crate::sudo_wrapper::SudoTransactionExtension;
11661166

11671167
pub struct AuraPalletIntrf;
11681168
impl pallet_admin_utils::AuraInterface<AuraId, ConstU32<32>> for AuraPalletIntrf {

runtime/src/sudo_wrapper.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
use sp_std::marker::PhantomData;
21
use codec::{Decode, DecodeWithMemTracking, Encode};
32
use frame_support::dispatch::{DispatchInfo, PostDispatchInfo};
3+
use frame_support::pallet_prelude::Weight;
44
use frame_support::traits::IsSubType;
5-
use scale_info::TypeInfo;
6-
use pallet_sudo::Call as SudoCall;
7-
use sp_runtime::traits::{AsSystemOriginSigner, DispatchInfoOf, Dispatchable, Implication, TransactionExtension, ValidateResult};
8-
use sp_runtime::transaction_validity::{InvalidTransaction, TransactionSource, TransactionValidityError};
95
use frame_system::Config;
6+
use pallet_sudo::Call as SudoCall;
7+
use scale_info::TypeInfo;
8+
use sp_runtime::traits::{
9+
AsSystemOriginSigner, DispatchInfoOf, Dispatchable, Implication, TransactionExtension,
10+
ValidateResult,
11+
};
12+
use sp_runtime::transaction_validity::{
13+
InvalidTransaction, TransactionSource, TransactionValidityError,
14+
};
15+
use sp_std::marker::PhantomData;
1016
use subtensor_macros::freeze_struct;
11-
use frame_support::pallet_prelude::Weight;
1217

1318
#[freeze_struct("99dce71278b36b44")]
1419
#[derive(Default, Encode, Decode, DecodeWithMemTracking, Clone, Eq, PartialEq, TypeInfo)]
@@ -31,9 +36,10 @@ impl<T: Config + Send + Sync + TypeInfo> SudoTransactionExtension<T> {
3136
}
3237
}
3338

34-
impl<T: Config + Send + Sync + TypeInfo + pallet_sudo::Config> TransactionExtension<<T as Config>::RuntimeCall> for SudoTransactionExtension<T>
39+
impl<T: Config + Send + Sync + TypeInfo + pallet_sudo::Config>
40+
TransactionExtension<<T as Config>::RuntimeCall> for SudoTransactionExtension<T>
3541
where
36-
<T as Config>::RuntimeCall:Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
42+
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
3743
<T as Config>::RuntimeOrigin: AsSystemOriginSigner<T::AccountId> + Clone,
3844
<T as Config>::RuntimeCall: IsSubType<SudoCall<T>>,
3945
{

runtime/tests/sudo_wrapper.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
use frame_support::assert_ok;
22
use frame_support::dispatch::GetDispatchInfo;
3+
use node_subtensor_runtime::{
4+
BuildStorage, Runtime, RuntimeCall, RuntimeGenesisConfig, RuntimeOrigin, System, SystemCall,
5+
sudo_wrapper,
6+
};
37
use sp_runtime::traits::{TransactionExtension, TxBaseImplication, ValidateResult};
4-
use sp_runtime::transaction_validity::{InvalidTransaction, TransactionSource, TransactionValidityError};
5-
use node_subtensor_runtime::{BuildStorage, RuntimeGenesisConfig, System, SystemCall, RuntimeCall, RuntimeOrigin, Runtime, sudo_wrapper};
8+
use sp_runtime::transaction_validity::{
9+
InvalidTransaction, TransactionSource, TransactionValidityError,
10+
};
611
use subtensor_runtime_common::AccountId;
712

813
const SUDO_ACCOUNT: [u8; 32] = [1_u8; 32];

0 commit comments

Comments
 (0)