Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rpc receivable unconfirmed and rpc.accounts_receivable_confirmed #4387

Merged

Conversation

dsiganos
Copy link
Contributor

The tests were indirectly checking for confirmed rather than directly checking for cemented status.
So there was a race condition where a block could be confirmed but not cemented.

In RPC speak, cofnirmed is equivalent to cemented and in this case the
test only check if the election is not active, which indirectly but not
directly implies that the election is confirmed. But even then it is not
necesarily cemented since that is an extra background step.

We should check for cemented with the function nano::test:confirmed(),
which is also confusing...
@dsiganos dsiganos added unit test Related to a new, changed or fixed unit test exclude from changelog Indicates the change is not relevant for appearing in the release changelog labels Jan 22, 2024
@dsiganos dsiganos merged commit 7e58c50 into nanocurrency:develop Jan 23, 2024
17 of 19 checks passed
@dsiganos dsiganos deleted the fix_rpc_receivable_unconfirmed branch January 23, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog Indicates the change is not relevant for appearing in the release changelog unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants