-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
new RoundChangeCertificate(Collections.emptyList()), | ||
proposerMessageFactory.createSignedProposalPayload(roundIdentifier, proposedBlock)); | ||
|
||
assertThat(validator.validateNewRoundMessage(msg)).isFalse(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test would succeed even if the message is signed by the proposer.
This is because no RoundChange message is included in the NewRound message.
The same applies to other tests below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
cefa3bb
to
533828a
Compare
return false; | ||
} | ||
|
||
for (final SignedData<RoundChangePayload> roundChangeMsg : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using stream().allMatch could simplify this
|
||
public class TestHelpers { | ||
|
||
public static ConsensusRoundIdentifier createFrom( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the class name or method it isn't clear what it's doing, perhaps rename method to createRoundIdentifier?
533828a
to
8fe5f1d
Compare
8fe5f1d
to
8fa8830
Compare
This adds a class which is able to determine if a received IBFT New Round message is valid.