Skip to content

Commit 93c2e4e

Browse files
committed
cargo fmt
1 parent b5ce250 commit 93c2e4e

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

pallets/admin-utils/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,10 +2222,7 @@ pub mod pallet {
22222222
DispatchClass::Operational,
22232223
Pays::Yes
22242224
))]
2225-
pub fn sudo_set_start_call_delay(
2226-
origin: OriginFor<T>,
2227-
delay: u64,
2228-
) -> DispatchResult {
2225+
pub fn sudo_set_start_call_delay(origin: OriginFor<T>, delay: u64) -> DispatchResult {
22292226
ensure_root(origin)?;
22302227
pallet_subtensor::Pallet::<T>::set_start_call_delay(delay);
22312228
log::debug!("StartCallDelay( delay: {delay:?} ) ");

pallets/admin-utils/src/tests/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,7 +2876,10 @@ fn test_sudo_set_start_call_delay_permissions_and_zero_delay() {
28762876

28772877
// Get initial delay value (should be non-zero)
28782878
let initial_delay = pallet_subtensor::StartCallDelay::<Test>::get();
2879-
assert!(initial_delay > 0, "Initial delay should be greater than zero");
2879+
assert!(
2880+
initial_delay > 0,
2881+
"Initial delay should be greater than zero"
2882+
);
28802883

28812884
// Test 1: Non-root account should fail to set delay
28822885
assert_err!(
@@ -2933,9 +2936,9 @@ fn test_sudo_set_start_call_delay_permissions_and_zero_delay() {
29332936
);
29342937

29352938
// Verify event was emitted
2936-
frame_system::Pallet::<Test>::assert_last_event(
2937-
RuntimeEvent::SubtensorModule(pallet_subtensor::Event::StartCallDelaySet(0))
2938-
);
2939+
frame_system::Pallet::<Test>::assert_last_event(RuntimeEvent::SubtensorModule(
2940+
pallet_subtensor::Event::StartCallDelaySet(0),
2941+
));
29392942

29402943
// Test 5: Try to start the subnet again - should SUCCEED (delay is now zero)
29412944
let current_block = frame_system::Pallet::<Test>::block_number();

pallets/subtensor/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,8 +1498,7 @@ pub mod pallet {
14981498

14991499
/// ITEM( start_call_delay )
15001500
#[pallet::storage]
1501-
pub type StartCallDelay<T> =
1502-
StorageValue<_, u64, ValueQuery, DefaultStartCallDelay<T>>;
1501+
pub type StartCallDelay<T> = StorageValue<_, u64, ValueQuery, DefaultStartCallDelay<T>>;
15031502

15041503
/// ITEM( min_network_lock_cost )
15051504
#[pallet::storage]

0 commit comments

Comments
 (0)