ChainSafe / ChainSafe/gossamer

chore(pkg/finality-grandpa): Implement `saturating_add` and `saturating_sub` on `VoteWeight`

Open
#3,511 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.