Skip to content

Commit 1792481

Browse files
committed
Fix Herder TODO
1 parent d64342b commit 1792481

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/herder/HerderImpl.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ void
433433
HerderImpl::beginApply()
434434
{
435435
// Tx set might be applied asyncronously, cancel the timer, it'll be
436-
// restarted when the tx set is applied This is needed to not mess with
436+
// restarted when the tx set is applied. This is needed to not mess with
437437
// Herder's recovery mechanism
438-
mOutOfSyncTimer.cancel();
438+
mTrackingTimer.cancel();
439439
}
440440

441441
void
@@ -2277,15 +2277,15 @@ HerderImpl::purgeOldPersistedTxSets()
22772277
}
22782278
}
22792279

2280-
// TODO: audit tracking heartbeat
22812280
// Tracking -> not tracking should only happen if there is nothing to apply
22822281
// If there's something to apply, it's possible the rest of the network is
2283-
// waiting for this node to vote In this case we should _still_ remain in
2282+
// waiting for this node to vote. In this case we should _still_ remain in
22842283
// tracking and emit nomination; If no externalize happens after that, then node
22852284
// can go into out of sync recovery.
22862285
void
22872286
HerderImpl::trackingHeartBeat()
22882287
{
2288+
releaseAssert(threadIsMain());
22892289
if (mApp.getConfig().MANUAL_CLOSE)
22902290
{
22912291
return;

src/ledger/LedgerManagerImpl.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@ LedgerManagerImpl::valueExternalized(LedgerCloseData const& ledgerData,
664664
releaseAssert(false);
665665
}
666666

667-
bool synced = cm.processLedger(ledgerData, isLatestSlot);
667+
bool synced =
668+
mApp.getCatchupManager().processLedger(ledgerData, isLatestSlot);
668669
if (!synced)
669670
{
670671
if (mState != LM_CATCHING_UP_STATE)
@@ -1096,7 +1097,7 @@ LedgerManagerImpl::closeLedger(LedgerCloseData const& ledgerData,
10961097
}
10971098

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

0 commit comments

Comments
 (0)