Skip to content

Commit

Permalink
Fix Herder TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-lokhova committed Dec 17, 2024
1 parent d64342b commit 1792481
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/herder/HerderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ void
HerderImpl::beginApply()
{
// Tx set might be applied asyncronously, cancel the timer, it'll be
// restarted when the tx set is applied This is needed to not mess with
// restarted when the tx set is applied. This is needed to not mess with
// Herder's recovery mechanism
mOutOfSyncTimer.cancel();
mTrackingTimer.cancel();
}

void
Expand Down Expand Up @@ -2277,15 +2277,15 @@ HerderImpl::purgeOldPersistedTxSets()
}
}

// TODO: audit tracking heartbeat
// Tracking -> not tracking should only happen if there is nothing to apply
// If there's something to apply, it's possible the rest of the network is
// waiting for this node to vote In this case we should _still_ remain in
// waiting for this node to vote. In this case we should _still_ remain in
// tracking and emit nomination; If no externalize happens after that, then node
// can go into out of sync recovery.
void
HerderImpl::trackingHeartBeat()
{
releaseAssert(threadIsMain());
if (mApp.getConfig().MANUAL_CLOSE)
{
return;
Expand Down
5 changes: 3 additions & 2 deletions src/ledger/LedgerManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ LedgerManagerImpl::valueExternalized(LedgerCloseData const& ledgerData,
releaseAssert(false);
}

bool synced = cm.processLedger(ledgerData, isLatestSlot);
bool synced =
mApp.getCatchupManager().processLedger(ledgerData, isLatestSlot);
if (!synced)
{
if (mState != LM_CATCHING_UP_STATE)
Expand Down Expand Up @@ -1096,7 +1097,7 @@ LedgerManagerImpl::closeLedger(LedgerCloseData const& ledgerData,
}

// Invoke completion handler on the _main_ thread: kick off publishing,
// cleanuo bucket files, notify herder to trigger next ledger
// cleanup bucket files, notify herder to trigger next ledger
auto completionHandler = [this, txs, ledgerSeq, externalize,
ledgerData]() mutable {
// Step 5. Maybe kick off publishing on complete checkpoint files
Expand Down

0 comments on commit 1792481

Please sign in to comment.