Skip to content

Commit

Permalink
chore: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
camfairchild committed Sep 11, 2024
1 parent a08989c commit 4e3c4f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pallets/subtensor/tests/coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pallets/subtensor/tests/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions pallets/subtensor/tests/swap_hotkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,14 +1135,18 @@ fn test_hotkey_swap_stake_delta() {
StakeDeltaSinceLastEmissionDrain::<Test>::insert(
old_hotkey,
coldkey,
(123 + coldkey.saturated_into::<i128>()).into(),
PackedI128::from(123 + coldkey.saturated_into::<i128>()),
);

StakingHotkeys::<Test>::insert(coldkey, vec![old_hotkey]);
}

// Add stake delta for one coldkey and the new_hotkey
StakeDeltaSinceLastEmissionDrain::<Test>::insert(new_hotkey, coldkeys[0], 456.into());
StakeDeltaSinceLastEmissionDrain::<Test>::insert(
new_hotkey,
coldkeys[0],
PackedI128::from(456),
);
// Add corresponding StakingHotkeys
StakingHotkeys::<Test>::insert(coldkeys[0], vec![old_hotkey, new_hotkey]);

Expand Down

0 comments on commit 4e3c4f6

Please sign in to comment.