modify ADR for MsgVote backwards compatibility

This commit is contained in:
antstalepresh
2020-11-02 23:10:39 +10:00
committed by GitHub
parent 71e551bbae
commit ebe73fa28b
+16 -1
View File
@@ -35,7 +35,22 @@ type Vote struct {
}
```
The `ValidateBasic` of a MsgVote struct would require that
And for backwards compatibility, we introduce `MsgWeightedVote` while keeping `MsgVote`.
```
type MsgVote struct {
ProposalID int64
Voter sdk.Address
Option Option
}
type MsgWeightedVote struct {
ProposalID int64
Voter sdk.Address
Options []WeightedVoteOption
}
```
The `ValidateBasic` of a `MsgWeightedVote` struct would require that
1. The sum of all the Rates is equal to 1.0
2. No Option is repeated