You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When funds are sent to an active stake account (by mistake or by e.g. JITO pools), the result of getStakeActivation remains unchanged. While active stake balance remains correct, I'd expect the inactive stake balance to not be 0, but be equal to the sent amount. Example:
Do not hardcode "0" inactiveBalance if the stake account is in an 'active' state, but calculate the inactiveBalance correctly (e.g. balance - activeStake - rentAmount)
The text was updated successfully, but these errors were encountered:
Good point. It looks like the deactivating and inactive cases already take the total lamports into account.
I have a PR up to make inactive_stake consistent across all states: #35116
The one case where my patch might be a little unintuitive is activating:
Problem
When funds are sent to an active stake account (by mistake or by e.g. JITO pools), the result of
getStakeActivation
remains unchanged. Whileactive
stake balance remains correct, I'd expect theinactive
stake balance to not be 0, but be equal to the sent amount. Example:before:
-- send 0.1 SOL to the stake account
after:
However, this state would be expected:
Proposed Solution
Do not hardcode "0" inactiveBalance if the stake account is in an 'active' state, but calculate the inactiveBalance correctly (e.g.
balance - activeStake - rentAmount
)The text was updated successfully, but these errors were encountered: