-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: LSM changes to distribution #4
Conversation
DefaultWeightMsgFundCommunityPool int = 50 | ||
OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" //nolint:gosec | ||
OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" //nolint:gosec | ||
OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission" //nolint:gosec |
Check failure
Code scanning / Golang security checks by gosec
Potential hardcoded credentials Error
DefaultWeightMsgWithdrawValidatorCommission int = 50 | ||
DefaultWeightMsgFundCommunityPool int = 50 | ||
OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" //nolint:gosec | ||
OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" //nolint:gosec |
Check failure
Code scanning / Golang security checks by gosec
Potential hardcoded credentials Error
DefaultWeightMsgWithdrawDelegationReward int = 50 | ||
DefaultWeightMsgWithdrawValidatorCommission int = 50 | ||
DefaultWeightMsgFundCommunityPool int = 50 | ||
OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" //nolint:gosec |
Check failure
Code scanning / Golang security checks by gosec
Potential hardcoded credentials Error
OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" //nolint:gosec | ||
OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission" //nolint:gosec | ||
OpWeightMsgFundCommunityPool = "op_weight_msg_fund_community_pool" //nolint:gosec | ||
OpWeightMsgWithdrawAllTokenizeShareRecordReward = "op_weight_msg_withdraw_all_tokenize_share_record_reward" //nolint:gosec |
Check failure
Code scanning / Golang security checks by gosec
Potential hardcoded credentials Error
OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" //nolint:gosec | ||
OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" //nolint:gosec | ||
OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission" //nolint:gosec | ||
OpWeightMsgFundCommunityPool = "op_weight_msg_fund_community_pool" //nolint:gosec |
Check failure
Code scanning / Golang security checks by gosec
Potential hardcoded credentials Error
func (msg MsgWithdrawTokenizeShareRecordReward) GetSigners() []sdk.AccAddress { | ||
owner, err := sdk.AccAddressFromBech32(msg.OwnerAddress) | ||
if err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
func (msg MsgWithdrawAllTokenizeShareRecordReward) GetSigners() []sdk.AccAddress { | ||
owner, err := sdk.AccAddressFromBech32(msg.OwnerAddress) | ||
if err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
Could please add BeforeTokenizeShareRecordRemoved to the hook methods of the distribution module? |
Nice catch |
Okay for merging |
@@ -98,6 +98,10 @@ func TestCalculateRewardsBasic(t *testing.T) { | |||
require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 2)}}, distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr).Commission) | |||
} | |||
|
|||
func TestWithdrawTokenizeShareRecordReward(t *testing.T) { | |||
// TODO add LSM test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge without this test as I will add it a little later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Missing tests will be added in subsequent PRs.
Description
Related: cosmos#18200
Port the LSM changes to the distribution module to 0.47. Also, add the staking changes necessary to deal with errors.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change