diff --git a/src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp b/src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp index 5ee4ce5519d..c57dee30610 100644 --- a/src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp +++ b/src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp @@ -175,8 +175,6 @@ loadLedgerInfos( "total_coins, closing_time, prev_closing_time, close_time_res, " "close_flags, ledger_seq FROM ledgers "; - uint32_t expNumResults = 1; - if (auto ledgerSeq = std::get_if(&whichLedger)) { sql << "WHERE ledger_seq = " + std::to_string(*ledgerSeq); @@ -189,8 +187,6 @@ loadLedgerInfos( auto minAndMax = std::get_if>(&whichLedger)) { - expNumResults = minAndMax->second - minAndMax->first; - sql << ("WHERE ledger_seq >= " + std::to_string(minAndMax->first) + " AND ledger_seq <= " + std::to_string(minAndMax->second));