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

Separate round change reception from RoundChangeCertificate #754

Merged
merged 5 commits into from
Feb 4, 2019

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Feb 4, 2019

IBFT2.1 requires that message content be separated, thus concepts
at the message level must not leak into the business logic - eg
RoundChangeCertificate should not be created by the
RoundChangeManager - rather an intermediate type is to be inserted.

IBFT2.1 requires that message content be separated, thus concepts
at the message level must not leak into the business logic - eg
RoundChangeCertificate should not be created by the
RoundChangeManager - rather an intermediate type is to be inserted.
@rain-on rain-on requested review from jframe and CjHare February 4, 2019 02:28
Copy link
Contributor

@CjHare CjHare left a comment

Choose a reason for hiding this comment

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

I'm still not a fan of passing Optional<> as a method parameter

@@ -49,4 +52,33 @@ public Address getProposerOfBlock(final BlockHeader header) {
final IbftExtraData ibftExtraData = IbftExtraData.decode(header.getExtraData());
return ibftExtraData.getValidators();
}

public int roundOfBlock(final BlockHeader header) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this used, maybe it was added for later code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed.

}

public static Block replaceRoundInBlock(
final Block block, final int round, final BlockHashFunction blockHashFunction) {
Copy link
Contributor

Choose a reason for hiding this comment

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

blockHashFunction isn't used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

.map(roundChange -> roundChange.getSignedPayload())
.collect(Collectors.toList());

final Optional<PreparedCertificate> latestdPreparedCertificate =
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: typo in latestdPreparedCertificate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@rain-on rain-on merged commit f5b07e8 into PegaSysEng:master Feb 4, 2019
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.

3 participants