diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 8d424782b..6a607beec 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1376,7 +1376,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 // @@ -1391,7 +1391,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)] @@ -1416,13 +1416,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': @@ -1431,8 +1431,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))] diff --git a/pallets/subtensor/src/staking.rs b/pallets/subtensor/src/staking.rs index 42c2a1ab9..991c0433e 100644 --- a/pallets/subtensor/src/staking.rs +++ b/pallets/subtensor/src/staking.rs @@ -117,6 +117,9 @@ impl Pallet { // * '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, @@ -173,8 +176,8 @@ impl Pallet { // - 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': @@ -186,6 +189,9 @@ impl Pallet { // * '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,