Skip to content

Commit

Permalink
fix underflow
Browse files Browse the repository at this point in the history
  • Loading branch information
unconst committed Dec 23, 2024
1 parent ecbe954 commit 6c05717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallets/subtensor/src/rpc_info/dynamic_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<T: Config> Pallet<T> {
}
let last_step: u64 = LastMechansimStepBlock::<T>::get(netuid);
let current_block: u64 = Pallet::<T>::get_current_block_as_u64();
let blocks_since_last_step: u64 = current_block - last_step;
let blocks_since_last_step: u64 = current_block.saturating_sub(last_step);
Some(DynamicInfo {
owner: SubnetOwner::<T>::get(netuid).into(),
netuid: netuid.into(),
Expand Down

0 comments on commit 6c05717

Please sign in to comment.