Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Refactor RoundChangeManager creation #578

Merged
merged 4 commits into from
Jan 16, 2019
Merged

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Jan 16, 2019

Constructor of the RoundChangeManager now accepts a
RoundChangeMessageValidator rather than creating it from inputs.

This removes complexity from this class, pushes creation back to the
validator factory, and simplifies the IbftBlockHeightManagerFactory.

Constructor of the RoundChangeManager now accepts a
RoundChangeMessageValidator rather than creating it from inputs.

This removes complexity from this class, pushes creation back to the
validator factory, and simplifies the IbftBlockHeightManagerFactory.
@rain-on rain-on requested review from jframe and CjHare January 16, 2019 01:40
@@ -81,20 +77,13 @@ public RoundChangeCertificate createRoundChangeCertificate() {
@VisibleForTesting
final Map<ConsensusRoundIdentifier, RoundChangeStatus> roundChangeCache = Maps.newHashMap();

private final int quorumSize;
private final long quorum;
Copy link
Contributor

Choose a reason for hiding this comment

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

Bit odd we are using quorum here and quorumSize elsewhere. Though it probably should be just quorum everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah agreed - will do a quick round up.

@rain-on rain-on merged commit f1a3a0c into PegaSysEng:master Jan 16, 2019
@rain-on rain-on deleted the msg_val_fact branch January 16, 2019 21:34
iikirilov pushed a commit to vinistevam/pantheon that referenced this pull request Jan 24, 2019
Constructor of the RoundChangeManager now accepts a
RoundChangeMessageValidator rather than creating it from inputs.

This removes complexity from this class, pushes creation back to the
validator factory, and simplifies the IbftBlockHeightManagerFactory.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants