Skip to content

stake: Correct off by one in revoke create helper. - #3784

Merged
davecgh merged 1 commit into
decred:masterfrom
davecgh:stake_create_revocation_helper
Aug 27, 2026
Merged

stake: Correct off by one in revoke create helper.#3784
davecgh merged 1 commit into
decred:masterfrom
davecgh:stake_create_revocation_helper

Conversation

@davecgh

@davecgh davecgh commented Aug 26, 2026

Copy link
Copy Markdown
Member

The helper method in the stake package for creating revocations does not currently allow zero-valued revocations even though they are valid by consensus. The error message even indicates the minimum allowed is 0.

This corrects the check so it is accurate and allows zero as intended.

It also adds a test to ensure proper functionality.

@davecgh davecgh added this to the 2.2.0 milestone Aug 26, 2026
The helper method in the stake package for creating revocations does not
currently allow zero-valued revocations even though they are valid by
consensus.  The error message even indicates the minimum allowed is 0.

This corrects the check so it is accurate and allows zero as intended.

It also adds a test to ensure proper functionality.
@davecgh
davecgh force-pushed the stake_create_revocation_helper branch from aefbcac to 5dd4ca5 Compare August 26, 2026 12:26
@davecgh
davecgh merged commit 5dd4ca5 into decred:master Aug 27, 2026
32 checks passed
@davecgh
davecgh deleted the stake_create_revocation_helper branch August 27, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants