Closed
Description
openedon Nov 7, 2018
This is the implementation of getting sign bytes of CreateValidator msg:
// get the bytes for the message signer to sign on
func (msg MsgCreateValidator) GetSignBytes() []byte {
b, err := MsgCdc.MarshalJSON(struct {
Description
DelegatorAddr sdk.AccAddress `json:"delegator_address"`
ValidatorAddr sdk.ValAddress `json:"validator_address"`
PubKey string `json:"pubkey"`
Delegation sdk.Coin `json:"delegation"`
}{
Description: msg.Description,
ValidatorAddr: msg.ValidatorAddr,
PubKey: sdk.MustBech32ifyConsPub(msg.PubKey),
Delegation: msg.Delegation,
})
if err != nil {
panic(err)
}
return sdk.MustSortJSON(b)
}
The above code location is here. This implementation does't include commission data into the sign bytes. I think this is improper.
Is there any special intention to leave commission data out?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment