From 4672efa1c1cedcf0f034a62b8b72fb1aa0603e3a Mon Sep 17 00:00:00 2001 From: Tyera Date: Tue, 23 Apr 2024 18:32:36 -0600 Subject: [PATCH] Add StakeError index comments (#1012) --- sdk/program/src/stake/instruction.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/program/src/stake/instruction.rs b/sdk/program/src/stake/instruction.rs index ff2e51d4491b5c..2d00caac141007 100644 --- a/sdk/program/src/stake/instruction.rs +++ b/sdk/program/src/stake/instruction.rs @@ -21,6 +21,7 @@ use { /// Reasons the stake might have had an error #[derive(Error, Debug, Clone, PartialEq, Eq, FromPrimitive, ToPrimitive)] pub enum StakeError { + // 0 #[error("not enough credits to redeem")] NoCreditsToRedeem, @@ -36,6 +37,7 @@ pub enum StakeError { #[error("split amount is more than is staked")] InsufficientStake, + // 5 #[error("stake account with transient stake cannot be merged")] MergeTransientStake, @@ -51,6 +53,7 @@ pub enum StakeError { #[error("insufficient voting activity in the reference vote account")] InsufficientReferenceVotes, + // 10 #[error("stake account is not delegated to the provided vote account")] VoteAddressMismatch, @@ -68,6 +71,7 @@ pub enum StakeError { #[error("stake redelegation to the same vote account is not permitted")] RedelegateToSameVoteAccount, + // 15 #[error("redelegated stake must be fully activated before deactivation")] RedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted,