Skip to content

Prevent duplicate polls in polling DB#659

Merged
fassadlr merged 7 commits intostratisproject:release/1.1.0.0from
quantumagi:polldbintegr
Aug 19, 2021
Merged

Prevent duplicate polls in polling DB#659
fassadlr merged 7 commits intostratisproject:release/1.1.0.0from
quantumagi:polldbintegr

Conversation

@quantumagi
Copy link
Contributor

@quantumagi quantumagi commented Aug 11, 2021

Errors relating to duplicate collateral addresses can be traced back to the existence of duplicate polls in the polling db which then leads to duplication of federation member data.

Federation can't contain members with duplicated collateral addresses.

This PR aims to prevent the possibility of duplicate polls.

Duplicate polling data could affect the federation make-up and lead to errors that indirectly relate to the federation.

See https://app.clickup.com/t/75j74e.

@quantumagi quantumagi requested a review from fassadlr August 11, 2021 05:45
@quantumagi quantumagi mentioned this pull request Aug 16, 2021

public void Add(Poll poll)
{
Guard.Assert(!this.polls.Contains(poll));
Copy link
Contributor

Choose a reason for hiding this comment

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

Im wondering whether we should perhaps LogWarning the poll details and rather just return? So that we know about a poll that was attempting to be re-added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@fassadlr fassadlr merged commit 1faa616 into stratisproject:release/1.1.0.0 Aug 19, 2021
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