From 4e3c4f601e795e29c38f71f708a65d81236d20ab Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Wed, 11 Sep 2024 16:51:00 -0400 Subject: [PATCH] chore: CI --- pallets/subtensor/tests/coinbase.rs | 4 ++-- pallets/subtensor/tests/staking.rs | 2 +- pallets/subtensor/tests/swap_hotkey.rs | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pallets/subtensor/tests/coinbase.rs b/pallets/subtensor/tests/coinbase.rs index a7473c8f5..176b65e10 100644 --- a/pallets/subtensor/tests/coinbase.rs +++ b/pallets/subtensor/tests/coinbase.rs @@ -953,7 +953,7 @@ fn test_coinbase_nominator_drainage_with_net_positive_delta() { // Notice that nominator1 stake is the new stake, including the removed stake assert_eq!( nominator_1_stake_before, - u64::try_from(100 + net_change).unwrap() as u64 + u64::try_from(100 + net_change).unwrap() ); // 5. Set emission and verify initial states @@ -1151,7 +1151,7 @@ fn test_coinbase_nominator_drainage_with_net_negative_delta() { // Notice that nominator1 stake is the new stake, including the removed stake assert_eq!( nominator_1_stake_before, - u64::try_from(100 + net_change).unwrap() as u64 + u64::try_from(100 + net_change).unwrap() ); // 5. Set emission and verify initial states diff --git a/pallets/subtensor/tests/staking.rs b/pallets/subtensor/tests/staking.rs index 7563c249c..a9fa711ef 100644 --- a/pallets/subtensor/tests/staking.rs +++ b/pallets/subtensor/tests/staking.rs @@ -2348,7 +2348,7 @@ fn test_stake_delta_tracks_adds_and_removes() { delegate_hotkey, delegate_coldkey )), - 0 as i128 + 0_i128 ); // Give the coldkey some balance; extra just in case diff --git a/pallets/subtensor/tests/swap_hotkey.rs b/pallets/subtensor/tests/swap_hotkey.rs index 9e9fba146..eb6cbeb6d 100644 --- a/pallets/subtensor/tests/swap_hotkey.rs +++ b/pallets/subtensor/tests/swap_hotkey.rs @@ -1135,14 +1135,18 @@ fn test_hotkey_swap_stake_delta() { StakeDeltaSinceLastEmissionDrain::::insert( old_hotkey, coldkey, - (123 + coldkey.saturated_into::()).into(), + PackedI128::from(123 + coldkey.saturated_into::()), ); StakingHotkeys::::insert(coldkey, vec![old_hotkey]); } // Add stake delta for one coldkey and the new_hotkey - StakeDeltaSinceLastEmissionDrain::::insert(new_hotkey, coldkeys[0], 456.into()); + StakeDeltaSinceLastEmissionDrain::::insert( + new_hotkey, + coldkeys[0], + PackedI128::from(456), + ); // Add corresponding StakingHotkeys StakingHotkeys::::insert(coldkeys[0], vec![old_hotkey, new_hotkey]);