Message: ExecuteMsg::CompoundRewards
This restakes rewards from all validators and sweeps contract rewards back into the default validator while handling treasury fees.
Inputs
No explicit user inputs — the function operates based on the contract's internal state and validators.
Branches and code coverage (including function calls)
Intended branches
Successfully restake rewards and sweep contract rewards when rewards exist.
Calculate fees based on
staker_info.fee
and mint treasury shares if calculated fees are greater than zero.
Negative behavior
Return early if no rewards are available (
total_rewards == 0
).