Page MenuHomePhabricator

[avalanche] Report the list of finalized blocks when votes are accounted for
ClosedPublic

Authored by deadalnix on Nov 11 2018, 19:00.

Details

Summary

AvalancheProcessor doesn't need to keep track of finalized items. Instead, it can forget about them let the caller know about finalization.

Depends on D2121

Test Plan

Modifed unit tests to reflect the change.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix changed the visibility from "Public (No Login Required)" to "Restricted Project (Project)".Nov 11 2018, 19:08

Separate accepted and rejected in two different vectors

Add test to make sure registerVotes do not resurrect votes.

jasonbcox retitled this revision from [avalanche] Report the list of finalized hashes when votes are acocunted for. to [avalanche] Report the list of finalized hashes when votes are accounted for.Nov 11 2018, 23:27
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/avalanche.cpp
54 โ†—(On Diff #5754)

note -> not

src/test/avalanche_tests.cpp
80 โ†—(On Diff #5754)

This is much better. thank you

This revision is now accepted and ready to land.Nov 11 2018, 23:46
deadalnix changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".Nov 21 2018, 14:02
deadalnix retitled this revision from [avalanche] Report the list of finalized hashes when votes are accounted for to [avalanche] Report the list of finalized blocks when votes are accounted for.Nov 21 2018, 21:10

Make the code more consistent with what's to come.

Use a better reporting technique

Fabien added inline comments.
src/avalanche.h
90 โ†—(On Diff #6039)

Not strictly required, but >= would be safer

This revision is now accepted and ready to land.Nov 23 2018, 15:50
This revision was automatically updated to reflect the committed changes.