ChainSafe / ChainSafe/gossamer
chore(pkg/finality-grandpa): Implement `saturating_add` and `saturating_sub` on `VoteWeight`
Open
S-grandpa
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Issue summary
- The rust code has some macros which generate the `saturating_add` and `saturating_sub` methods for certain types to avoid overflows.
- We should implement this as well for `VoteWeight` in the go package
## Other information and links
- https://github.com/paritytech/finality-grandpa/blob/a5bd965782216a95f017a65527a0a4fe28203e4d/src/weights.rs#L38
Contributor guide
Assessment
This issue has not been assessed yet.