Skip to content

Commit 4cef617

Browse files
committed
fix Identifier usage
1 parent 3917ad3 commit 4cef617

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/events/BlockTimerExpiry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public BftEvents.Type getType() {
4141
/**
4242
* Gets round identifier.
4343
*
44-
* @return the round indentifier
44+
* @return the round Identifier
4545
*/
46-
public ConsensusRoundIdentifier getRoundIndentifier() {
46+
public ConsensusRoundIdentifier getRoundIdentifier() {
4747
return roundIdentifier;
4848
}
4949

consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/statemachine/BaseBftController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,14 @@ public void handleNewBlockEvent(final NewChainHead newChainHead) {
162162

163163
@Override
164164
public void handleBlockTimerExpiry(final BlockTimerExpiry blockTimerExpiry) {
165-
final ConsensusRoundIdentifier roundIndentifier = blockTimerExpiry.getRoundIndentifier();
166-
if (isMsgForCurrentHeight(roundIndentifier)) {
167-
getCurrentHeightManager().handleBlockTimerExpiry(roundIndentifier);
165+
final ConsensusRoundIdentifier roundIdentifier = blockTimerExpiry.getRoundIdentifier();
166+
if (isMsgForCurrentHeight(roundIdentifier)) {
167+
getCurrentHeightManager().handleBlockTimerExpiry(roundIdentifier);
168168
} else {
169169
LOG.trace(
170170
"Block timer event discarded as it is not for current block height chainHeight={} eventHeight={}",
171171
getCurrentHeightManager().getChainHeight(),
172-
roundIndentifier.getSequenceNumber());
172+
roundIdentifier.getSequenceNumber());
173173
}
174174
}
175175

consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/BlockTimerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void aBlockTimerExpiryEventIsAddedToTheQueueOnExpiry() throws Interrupted
141141
assertThat(eventQueue.size()).isEqualTo(1);
142142
final BftEvent queuedEvent = eventQueue.poll(0, TimeUnit.SECONDS);
143143
assertThat(queuedEvent).isInstanceOf(BlockTimerExpiry.class);
144-
assertThat(((BlockTimerExpiry) queuedEvent).getRoundIndentifier())
144+
assertThat(((BlockTimerExpiry) queuedEvent).getRoundIdentifier())
145145
.usingRecursiveComparison()
146146
.isEqualTo(round);
147147
}
@@ -171,7 +171,7 @@ public void eventIsImmediatelyAddedToTheQueueIfAbsoluteExpiryIsEqualToNow() {
171171
verify(mockQueue).add(bftEventCaptor.capture());
172172

173173
assertThat(bftEventCaptor.getValue() instanceof BlockTimerExpiry).isTrue();
174-
assertThat(((BlockTimerExpiry) bftEventCaptor.getValue()).getRoundIndentifier())
174+
assertThat(((BlockTimerExpiry) bftEventCaptor.getValue()).getRoundIdentifier())
175175
.usingRecursiveComparison()
176176
.isEqualTo(round);
177177
}
@@ -201,7 +201,7 @@ public void eventIsImmediatelyAddedToTheQueueIfAbsoluteExpiryIsInThePast() {
201201
verify(mockQueue).add(bftEventCaptor.capture());
202202

203203
assertThat(bftEventCaptor.getValue() instanceof BlockTimerExpiry).isTrue();
204-
assertThat(((BlockTimerExpiry) bftEventCaptor.getValue()).getRoundIndentifier())
204+
assertThat(((BlockTimerExpiry) bftEventCaptor.getValue()).getRoundIdentifier())
205205
.usingRecursiveComparison()
206206
.isEqualTo(round);
207207
}

0 commit comments

Comments
 (0)