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
We can optimize this to send total rewards only once at the end of the function.
To do this, we should change WithdrawRewards to not send coins, instead return just sdk.Coins.
But we need to discuss more about this optimization. It just reduces gas cost of MsgUnstake.
The text was updated successfully, but these errors were encountered:
Currently we call
WithdrawRewards
for each staking coin denom, which sends rewards for that denom to the farmer:farming/x/farming/keeper/staking.go
Lines 280 to 301 in debb2e6
We can optimize this to send total rewards only once at the end of the function.
To do this, we should change
WithdrawRewards
to not send coins, instead return justsdk.Coins
.But we need to discuss more about this optimization. It just reduces gas cost of
MsgUnstake
.The text was updated successfully, but these errors were encountered: