Skip to content

Commit

Permalink
fix the synchronizer usage
Browse files Browse the repository at this point in the history
Signed-off-by: Leni <leniram159@gmail.com>
  • Loading branch information
leniram159 committed Jun 24, 2024
1 parent 609eb76 commit 1568133
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public abstract class BaseBftController implements BftEventHandler {
private final FutureMessageBuffer futureMessageBuffer;
private final Gossiper gossiper;
private final MessageTracker duplicateMessageTracker;
private final SynchronizerUpdater sychronizerUpdater;
private final SynchronizerUpdater synchronizerUpdater;

private final AtomicBoolean started = new AtomicBoolean(false);

Expand All @@ -56,21 +56,21 @@ public abstract class BaseBftController implements BftEventHandler {
* @param gossiper the gossiper
* @param duplicateMessageTracker the duplicate message tracker
* @param futureMessageBuffer the future message buffer
* @param sychronizerUpdater the synchronizer updater
* @param synchronizerUpdater the synchronizer updater
*/
protected BaseBftController(
final Blockchain blockchain,
final BftFinalState bftFinalState,
final Gossiper gossiper,
final MessageTracker duplicateMessageTracker,
final FutureMessageBuffer futureMessageBuffer,
final SynchronizerUpdater sychronizerUpdater) {
final SynchronizerUpdater synchronizerUpdater) {
this.blockchain = blockchain;
this.bftFinalState = bftFinalState;
this.futureMessageBuffer = futureMessageBuffer;
this.gossiper = gossiper;
this.duplicateMessageTracker = duplicateMessageTracker;
this.sychronizerUpdater = sychronizerUpdater;
this.synchronizerUpdater = synchronizerUpdater;
}

@Override
Expand Down Expand Up @@ -221,7 +221,7 @@ private boolean processMessage(final BftMessage<?> msg, final Message rawMsg) {
futureMessageBuffer.addMessage(msgRoundIdentifier.getSequenceNumber(), rawMsg);
// Notify the synchronizer the transmitting peer must have the parent block to the received
// message's target height.
sychronizerUpdater.updatePeerChainState(
synchronizerUpdater.updatePeerChainState(
msgRoundIdentifier.getSequenceNumber() - 1L, rawMsg.getConnection());
} else {
LOG.trace(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class IbftController extends BaseBftController {
* @param gossiper the gossiper
* @param duplicateMessageTracker the duplicate message tracker
* @param futureMessageBuffer the future message buffer
* @param sychronizerUpdater the synchronizer updater
* @param synchronizerUpdater the synchronizer updater
*/
public IbftController(
final Blockchain blockchain,
Expand All @@ -55,15 +55,15 @@ public IbftController(
final Gossiper gossiper,
final MessageTracker duplicateMessageTracker,
final FutureMessageBuffer futureMessageBuffer,
final SynchronizerUpdater sychronizerUpdater) {
final SynchronizerUpdater synchronizerUpdater) {

super(
blockchain,
bftFinalState,
gossiper,
duplicateMessageTracker,
futureMessageBuffer,
sychronizerUpdater);
synchronizerUpdater);
this.ibftBlockHeightManagerFactory = ibftBlockHeightManagerFactory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class QbftController extends BaseBftController {
* @param gossiper the gossiper
* @param duplicateMessageTracker the duplicate message tracker
* @param futureMessageBuffer the future message buffer
* @param sychronizerUpdater the synchronizer updater
* @param synchronizerUpdater the synchronizer updater
* @param bftExtraDataCodec the bft extra data codec
*/
public QbftController(
Expand All @@ -58,7 +58,7 @@ public QbftController(
final Gossiper gossiper,
final MessageTracker duplicateMessageTracker,
final FutureMessageBuffer futureMessageBuffer,
final SynchronizerUpdater sychronizerUpdater,
final SynchronizerUpdater synchronizerUpdater,
final BftExtraDataCodec bftExtraDataCodec) {

super(
Expand All @@ -67,7 +67,7 @@ public QbftController(
gossiper,
duplicateMessageTracker,
futureMessageBuffer,
sychronizerUpdater);
synchronizerUpdater);
this.qbftBlockHeightManagerFactory = qbftBlockHeightManagerFactory;
this.bftExtraDataCodec = bftExtraDataCodec;
}
Expand Down

0 comments on commit 1568133

Please sign in to comment.