From 992d5a7a70215a9568281d9953df1af4ff7db4e4 Mon Sep 17 00:00:00 2001 From: Francis Mendoza Date: Wed, 25 Jan 2023 13:49:28 -0800 Subject: [PATCH] [FOLDED] Eliminate remaining bypass and add comment on rare edge case where it's necessary (#298) (#484) --- src/etl/ETLSource.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/etl/ETLSource.cpp b/src/etl/ETLSource.cpp index d8855797..ca0b670e 100644 --- a/src/etl/ETLSource.cpp +++ b/src/etl/ETLSource.cpp @@ -1159,7 +1159,11 @@ ETLLoadBalancer::execute(Func f, uint32_t ledgerSequence) log_.debug() << "Attempting to execute func. ledger sequence = " << ledgerSequence << " - source = " << source->toString(); - if (source->hasLedger(ledgerSequence) || true) + // Originally, it was (source->hasLedger(ledgerSequence) || true) + /* Sometimes rippled has ledger but doesn't actually know. However, + but this does NOT happen in the normal case and is safe to remove + This || true is only needed when loading full history standalone */ + if (source->hasLedger(ledgerSequence)) { bool res = f(source); if (res)