Page MenuHomePhabricator

[avalanche] Initialize PeerData from ArgsManager
AbandonedPublic

Authored by Fabien on Apr 15 2021, 12:49.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This actually makes the PeerData initialization independent from the
processor initialization. Next step is to move the initial proof
verification to the PeerData constructor as well.

Depends on D9419.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Apr 15 2021, 12:49
deadalnix requested changes to this revision.Apr 19 2021, 23:29
deadalnix added subscribers: PiRK, deadalnix.

This kinda have the right idea, but the execution is a problem. For as long as you do these in the various constructors, you must have objects at the end, and therefore you end up constructing possibly invalid objects, which is just bad design.

@PiRK started creating a factory method to construct the avalanche::Processor, why is this approach suddenly better?

Passing down the arg manager is a yes, but the execution isn't right.

This revision now requires changes to proceed.Apr 19 2021, 23:29