Skip to content

Fix outdated claim-unclaimed-rewards text and can-claim check - #1252

Merged
0xfornax merged 1 commit into
masterfrom
fix-unclaimed-rewards
Oct 1, 2026
Merged

0xfornax merged 1 commit into
masterfrom
fix-unclaimed-rewards

Conversation

@thomaspanf

Copy link
Copy Markdown
Member

The following text in the claim-unclaimed-rewards CLI path is outdated and misleading:

Your node %s's rewards were distributed, but the withdrawal address (at the time of distribution) was unable to accept ETH

The text matches the initial RPIP-57 implementation, where the node share was only credited to unclaimed rewards if the withdrawal address could not accept ETH. This was eventually changed so that distributions not called by the node or its withdrawal address always credit the node share to unclaimed rewards, rather than attempting the withdrawal address.

This PR also fixes an issue with the can-claim-unclaimed-rewards API path. It checked for a failed node.GetUnclaimedRewardsRaw() call rather than a non-zero unclaimedRewards, so it always returned CanClaim = true.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Coverage Report

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/node 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool/api/node 2.00% (+0.00%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/node/claim-unclaimed-rewards.go 0.00% (ø) 1260 (+151) 0 1260 (+151)
github.com/rocket-pool/smartnode/rocketpool/api/node/claim-unclaimed-rewards.go 0.00% (ø) 1644 (-61) 0 1644 (-61)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@0xfornax
0xfornax merged commit 1bfab5d into master Oct 1, 2026
6 checks passed
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.

2 participants