Page MenuHomePhabricator

[avalanche] Add a block registry and facility to register votes on these blocks.
ClosedPublic

Authored by deadalnix on Nov 11 2018, 02:48.

Details

Reviewers
Fabien
schancel
Group Reviewers
Restricted Project
Summary

This is essentially an interface to use what was created in D2040 in a way that is applicable to the Bitcoin Cash protocol.

Depends on D2040

Test Plan

Added test cases.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalancheblock
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3835
Build 5743: Bitcoin ABC Buildbot (legacy)
Build 5742: arc lint + arc unit

Event Timeline

deadalnix changed the visibility from "Public (No Login Required)" to "Restricted Project (Project)".Nov 11 2018, 02:48
schancel added inline comments.
src/test/avalanche_tests.cpp
102

Why is this error still considered valid? It shouldn't be finalized if it's invalid?

Remove blocks_to_reconciliate and dd test for addBlockToReconciliate return value.

jasonbcox requested changes to this revision.Nov 11 2018, 17:16
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/test/avalanche_tests.cpp
102

Ya, seems like this should move down a few lines to before the undo for loop for clarity.

This revision now requires changes to proceed.Nov 11 2018, 17:16
src/test/avalanche_tests.cpp
102

Correction. Shouldn't it NOT be finalized if it's invalid?

deadalnix marked an inline comment as done.
deadalnix added inline comments.
src/test/avalanche_tests.cpp
102

Because it is how the protocol works. We don't stop everything because one dude says no.

addBlockToReconciliate => addBlockToReconcile

src/test/avalanche_tests.cpp
102

Then you need to comment something like Vote one more time to finalize. Using a no vote to ensure a small number of no votes still allow finalization.

Make AvalancheVote layout consistent with CInv

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/avalanche_tests.cpp
94 ↗(On Diff #5759)

accepeted => accepted

jasonbcox requested changes to this revision.Nov 12 2018, 22:06
This revision now requires changes to proceed.Nov 12 2018, 22:06

Use CBlockIndex internally

deadalnix changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".Nov 21 2018, 12:58

Use a map instead of a vector of pairs.

This revision is now accepted and ready to land.Nov 22 2018, 18:13
This revision was automatically updated to reflect the committed changes.