Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in method name #3446

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public final void verifyMessagesReceivedNonProposingExcluding(
verifyMessagesReceived(candidates, msgs);
}

public final void verifyMessagesReceivedNonPropsing(final BftMessage<?>... msgs) {
public final void verifyMessagesReceivedNonProposing(final BftMessage<?>... msgs) {
verifyMessagesReceived(nonProposingPeers, msgs);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ public void gossipMessagesToPeers() {

final Proposal proposal = sender.injectProposal(roundId, block);
// sender node will have a prepare message as an effect of the proposal being sent
peers.verifyMessagesReceivedNonPropsing(proposal, localPrepare);
peers.verifyMessagesReceivedNonProposing(proposal, localPrepare);
peers.verifyMessagesReceivedProposer(localPrepare);

final Prepare prepare = sender.injectPrepare(roundId, block.getHash());
peers.verifyMessagesReceivedNonPropsing(prepare);
peers.verifyMessagesReceivedNonProposing(prepare);
peers.verifyNoMessagesReceivedProposer();

final Commit commit = sender.injectCommit(roundId, block);
peers.verifyMessagesReceivedNonPropsing(commit);
peers.verifyMessagesReceivedNonProposing(commit);
peers.verifyNoMessagesReceivedProposer();

final RoundChange roundChange = msgFactory.createRoundChange(roundId, Optional.empty());
Expand All @@ -98,18 +98,18 @@ public void gossipMessagesToPeers() {
Collections.singletonList(roundChange.getSignedPayload()),
roundChange.getPrepares(),
block);
peers.verifyMessagesReceivedNonPropsing(nextRoundProposal);
peers.verifyMessagesReceivedNonProposing(nextRoundProposal);
peers.verifyNoMessagesReceivedProposer();

sender.injectRoundChange(roundId, Optional.empty());
peers.verifyMessagesReceivedNonPropsing(roundChange);
peers.verifyMessagesReceivedNonProposing(roundChange);
peers.verifyNoMessagesReceivedProposer();
}

@Test
public void onlyGossipOnce() {
final Prepare prepare = sender.injectPrepare(roundId, block.getHash());
peers.verifyMessagesReceivedNonPropsing(prepare);
peers.verifyMessagesReceivedNonProposing(prepare);

sender.injectPrepare(roundId, block.getHash());
peers.verifyNoMessagesReceivedNonProposing();
Expand Down Expand Up @@ -173,6 +173,6 @@ public void futureMessageGetGossipedLater() {
.getController()
.handleNewBlockEvent(new NewChainHead(signedCurrentHeightBlock.getHeader()));

peers.verifyMessagesReceivedNonPropsing(futurePrepare);
peers.verifyMessagesReceivedNonProposing(futurePrepare);
}
}