Page MenuHomePhabricator

[avalanche] Add some tests to check that duplicate votes are not counted
ClosedPublic

Authored by sdulfari on May 19 2022, 18:09.

Details

Summary

Every change we make to vote accounting risks breaking vote deduping.
This patch adds some test coverage to reduce that risk since I plan on doing
just that.

Depends on D11499

Test Plan
ninja check-avalanche

Event Timeline

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/test/voterecord_tests.cpp
155
This revision is now accepted and ready to land.May 20 2022, 09:28

Added finalization sanity check

src/avalanche/test/voterecord_tests.cpp
155

I tried to make this work, but the side effects do not appear to happen in the way we expect with BOOST_CHECK_EQUAL. I added a sanity check for finalization at the end of this test instead.