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

Renamed IBFT message classes #333

Merged
merged 3 commits into from
Dec 6, 2018
Merged

Renamed IBFT message classes #333

merged 3 commits into from
Dec 6, 2018

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Nov 29, 2018

No description provided.

Errorific
Errorific previously approved these changes Nov 29, 2018
@rain-on rain-on force-pushed the rename branch 2 times, most recently from d7af6f5 to 3c7733b Compare November 30, 2018 00:46
@@ -44,8 +44,8 @@ public RoundChangeCertificate getRoundChangeCertificate() {
return roundChangeCertificate;
}

public SignedData<PrepreparePayload> getIbftPrePrepareMessage() {
return ibftPrePrepareMessage;
public SignedData<ProposalPayload> getIbftPreProposalMessage() {
Copy link
Contributor

Choose a reason for hiding this comment

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

PreProposalMessage?

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.

@@ -115,13 +115,13 @@ private boolean validatePreprepareCertificateRound(
final ConsensusRoundIdentifier roundChangeTarget) {

if (prepareCertRound.getSequenceNumber() != roundChangeTarget.getSequenceNumber()) {
LOG.info("Invalid RoundChange message, PreprepareCertificate is not for local chain height.");
LOG.info("Invalid RoundChange message, PreparedCertificate is not for local chain height.");
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be ProposalCertificate rather than PreparedCertificate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no - it's still a PreparedCertificate I do believe (as in, the node is in the prepared state).

verify(basicValidator, times(1))
.addPreprepareMessage(prepareCertificate.getIbftPrePrepareMessage());
.createAt(prepareCertificate.getProposalMessage().getPayload().getRoundIdentifier());
verify(basicValidator, times(1)).addPreprepareMessage(prepareCertificate.getProposalMessage());
Copy link
Contributor

Choose a reason for hiding this comment

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

is addPreprepareMessage something that should be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactor is not your friend - it should just be addPrepareMessage.

@rain-on rain-on force-pushed the rename branch 5 times, most recently from 8a34033 to e3d8a40 Compare December 4, 2018 02:01
public SignedData<ProposalPayload> createSignedProposalPayload(
final ConsensusRoundIdentifier roundIdentifier, final Block block) {

ProposalPayload prePrepareUnsignedMessageData = new ProposalPayload(roundIdentifier, block);
Copy link
Contributor

Choose a reason for hiding this comment

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

prePrepareUnsignedMessageData

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.

final IbftSignedMessageData<IbftUnsignedPrePrepareMessageData> preprepareMessage =
certificate.getIbftPrePrepareMessage();
final PreparedCertificate certificate, final ConsensusRoundIdentifier roundChangeTarget) {
final SignedData<ProposalPayload> preprepareMessage = certificate.getProposalPayload();
Copy link
Contributor

Choose a reason for hiding this comment

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

should be proposalMessage

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 7891132 into PegaSysEng:master Dec 6, 2018
@rain-on rain-on deleted the rename branch January 16, 2019 21:36
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