Skip to content

Commit

Permalink
Merge pull request #390 from cuteolaf/patch-1
Browse files Browse the repository at this point in the history
update comments
  • Loading branch information
distributedstatemachine committed May 13, 2024
2 parents 74f2f3b + e57b429 commit f073f03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
14 changes: 7 additions & 7 deletions pallets/subtensor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ pub mod pallet {
// * 'take' (u16):
// - The new stake proportion that this hotkey takes from delegations.
// The new value can be between 0 and 11_796 and should be strictly
// lower than the previous value. It T is the new value (rational number),
// lower than the previous value. If T is the new value (rational number),
// the the parameter is calculated as [65535 * T]. For example, 1% would be
// [0.01 * 65535] = [655.35] = 655
//
Expand All @@ -1331,7 +1331,7 @@ pub mod pallet {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldkey.
//
// * 'InvalidTransaction':
// * 'InvalidTake':
// - The delegate is setting a take which is not lower than the previous.
//
#[pallet::call_index(65)]
Expand All @@ -1356,13 +1356,13 @@ pub mod pallet {
// * 'take' (u16):
// - The new stake proportion that this hotkey takes from delegations.
// The new value can be between 0 and 11_796 and should be strictly
// greater than the previous value. It T is the new value (rational number),
// greater than the previous value. If T is the new value (rational number),
// the the parameter is calculated as [65535 * T]. For example, 1% would be
// [0.01 * 65535] = [655.35] = 655
//
// # Event:
// * TakeDecreased;
// - On successfully setting a decreased take for this hotkey.
// * TakeIncreased;
// - On successfully setting a increased take for this hotkey.
//
// # Raises:
// * 'NotRegistered':
Expand All @@ -1371,8 +1371,8 @@ pub mod pallet {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldkey.
//
// * 'InvalidTransaction':
// - The delegate is setting a take which is not lower than the previous.
// * 'InvalidTake':
// - The delegate is setting a take which is not greater than the previous.
//
#[pallet::call_index(66)]
#[pallet::weight((0, DispatchClass::Normal, Pays::No))]
Expand Down
10 changes: 8 additions & 2 deletions pallets/subtensor/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ impl<T: Config> Pallet<T> {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldket.
//
// * 'InvalidTake':
// - The delegate is setting a take which is not lower than the previous.
//
pub fn do_decrease_take(
origin: T::RuntimeOrigin,
hotkey: T::AccountId,
Expand Down Expand Up @@ -173,8 +176,8 @@ impl<T: Config> Pallet<T> {
// - The stake proportion that this hotkey takes from delegations for subnet ID.
//
// # Event:
// * TakeDecreased;
// - On successfully setting a decreased take for this hotkey.
// * TakeIncreased;
// - On successfully setting a increased take for this hotkey.
//
// # Raises:
// * 'NotRegistered':
Expand All @@ -186,6 +189,9 @@ impl<T: Config> Pallet<T> {
// * 'TxRateLimitExceeded':
// - Thrown if key has hit transaction rate limit
//
// * 'InvalidTake':
// - The delegate is setting a take which is not greater than the previous.
//
pub fn do_increase_take(
origin: T::RuntimeOrigin,
hotkey: T::AccountId,
Expand Down

0 comments on commit f073f03

Please sign in to comment.