Skip to content

Fix auto-self-nonimante#118

Merged
majecty merged 6 commits intoCodeChain-io:masterfrom
majecty:f/fix-test-in-master
Jan 29, 2020
Merged

Fix auto-self-nonimante#118
majecty merged 6 commits intoCodeChain-io:masterfrom
majecty:f/fix-test-in-master

Conversation

@majecty
Copy link

@majecty majecty commented Jan 29, 2020

No description provided.

Park Juhyung added 5 commits January 29, 2020 11:17
Foundry should send a self-nomination transaction before too late
Foundry should send a self-nomination transaction before the
nomination ends.
Since the bob is using the auto-self-nomination, we don't need to send
the self-nomination transaction manually in the test. Occasionally, the
test failed because of the seq conflict with auto-selfnomination and
the manual transaction.
@majecty majecty requested a review from MSNTCS January 29, 2020 02:20
@majecty majecty added the bug Something isn't working label Jan 29, 2020
let candidate_need_nomination = candidate.get_candidate(&address).unwrap();
if candidate_need_nomination.nomination_ends_at <= current_term + NEED_NOMINATION_UNDER_TERM_LEFT {
cdebug!(ENGINE, "No need self nominate");
if candidate_need_nomination.nomination_ends_at + NEED_NOMINATION_UNDER_TERM_LEFT <= current_term {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We missed this condition.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it should be reversed.

The purpose of the test is testing auto-self-nomination.
@majecty majecty merged commit e22ea52 into CodeChain-io:master Jan 29, 2020
@majecty majecty deleted the f/fix-test-in-master branch January 29, 2020 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants