Skip to content

Commit 263c1b4

Browse files
committed
remove old tests wrong behaviour
1 parent 7202d91 commit 263c1b4

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

pallets/subtensor/src/tests/swap_hotkey.rs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -116,56 +116,6 @@ fn test_swap_total_hotkey_stake() {
116116
});
117117
}
118118

119-
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test swap_hotkey -- test_swap_last_tx_block --exact --nocapture
120-
#[test]
121-
fn test_swap_last_tx_block() {
122-
new_test_ext(1).execute_with(|| {
123-
let old_hotkey = U256::from(1);
124-
let new_hotkey = U256::from(2);
125-
let coldkey = U256::from(3);
126-
let mut weight = Weight::zero();
127-
128-
LastTxBlock::<Test>::insert(old_hotkey, 1000);
129-
assert_ok!(SubtensorModule::perform_hotkey_swap(
130-
&old_hotkey,
131-
&new_hotkey,
132-
&coldkey,
133-
&mut weight
134-
));
135-
136-
assert!(!LastTxBlock::<Test>::contains_key(old_hotkey));
137-
assert_eq!(
138-
LastTxBlock::<Test>::get(new_hotkey),
139-
SubtensorModule::get_current_block_as_u64()
140-
);
141-
});
142-
}
143-
144-
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test swap_hotkey -- test_swap_last_tx_block_delegate_take --exact --nocapture
145-
#[test]
146-
fn test_swap_last_tx_block_delegate_take() {
147-
new_test_ext(1).execute_with(|| {
148-
let old_hotkey = U256::from(1);
149-
let new_hotkey = U256::from(2);
150-
let coldkey = U256::from(3);
151-
let mut weight = Weight::zero();
152-
153-
crate::LastTxBlockDelegateTake::<Test>::insert(old_hotkey, 1000);
154-
assert_ok!(SubtensorModule::perform_hotkey_swap(
155-
&old_hotkey,
156-
&new_hotkey,
157-
&coldkey,
158-
&mut weight
159-
));
160-
161-
assert!(!LastTxBlockDelegateTake::<Test>::contains_key(old_hotkey));
162-
assert_eq!(
163-
LastTxBlockDelegateTake::<Test>::get(new_hotkey),
164-
SubtensorModule::get_current_block_as_u64()
165-
);
166-
});
167-
}
168-
169119
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --test swap_hotkey -- test_swap_senate_members --exact --nocapture
170120
#[test]
171121
fn test_swap_senate_members() {

0 commit comments

Comments
 (0)