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

[EC-183] Added RLP enc/dec for PrePrepare, Commit and NewRound messages #200

Prev Previous commit
Next Next commit
Fixed bug in IbftUnsignedNewRoundMessageData::writeTo
  • Loading branch information
saltiniroberto committed Nov 21, 2018
commit 21bc75432cadf8b9386684620efa165eb543df31
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import tech.pegasys.pantheon.consensus.ibft.ConsensusRoundIdentifier;
import tech.pegasys.pantheon.consensus.ibft.ibftmessage.IbftV2;
import tech.pegasys.pantheon.ethereum.rlp.BytesValueRLPOutput;
import tech.pegasys.pantheon.ethereum.rlp.RLPInput;
import tech.pegasys.pantheon.ethereum.rlp.RLPOutput;

Expand Down Expand Up @@ -44,11 +43,10 @@ public IbftRoundChangeCertificate getRoundChangeCertificate() {
@Override
public void writeTo(final RLPOutput rlpOutput) {
// RLP encode of the message data content (round identifier and prepared certificate)
BytesValueRLPOutput ibftMessage = new BytesValueRLPOutput();
ibftMessage.startList();
roundChangeIdentifier.writeTo(ibftMessage);
roundChangeCertificate.writeTo(ibftMessage);
ibftMessage.endList();
rlpOutput.startList();
roundChangeIdentifier.writeTo(rlpOutput);
roundChangeCertificate.writeTo(rlpOutput);
rlpOutput.endList();
}

public static IbftUnsignedNewRoundMessageData readFrom(final RLPInput rlpInput) {
Expand Down