Skip to content

Commit e53616a

Browse files
committed
Further simplifications
1 parent b09dc91 commit e53616a

8 files changed

+4
-20
lines changed

src/catchup/CatchupConfiguration.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,21 @@
1010
namespace stellar
1111
{
1212

13-
void
14-
CatchupConfiguration::checkInvariants() const
15-
{
16-
}
17-
1813
CatchupConfiguration::CatchupConfiguration(LedgerNumHashPair ledgerHashPair,
1914
uint32_t count, Mode mode)
2015
: mCount{count}, mLedgerHashPair{ledgerHashPair}, mMode{mode}
2116
{
22-
checkInvariants();
2317
}
2418

2519
CatchupConfiguration::CatchupConfiguration(uint32_t toLedger, uint32_t count,
2620
Mode mode)
2721
: mCount{count}, mLedgerHashPair{toLedger, std::nullopt}, mMode{mode}
2822
{
29-
checkInvariants();
3023
}
3124

3225
CatchupConfiguration
3326
CatchupConfiguration::resolve(uint32_t remoteCheckpoint) const
3427
{
35-
checkInvariants();
3628
auto cfg = *this;
3729
if (toLedger() == CatchupConfiguration::CURRENT)
3830
{

src/catchup/CatchupConfiguration.h

-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ class CatchupConfiguration
102102
uint32_t mCount;
103103
LedgerNumHashPair mLedgerHashPair;
104104
Mode mMode;
105-
void checkInvariants() const;
106105
};
107106

108107
uint32_t parseLedger(std::string const& str);

src/herder/HerderImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ HerderImpl::processExternalized(uint64 slotIndex, StellarValue const& value,
306306
mPendingEnvelopes.getTxSet(value.txSetHash);
307307

308308
// save the SCP messages in the database
309-
if (mApp.getConfig().modeStoresHistory())
309+
if (mApp.getConfig().MODE_STORES_HISTORY_MISC)
310310
{
311311
ZoneNamedN(updateSCPHistoryZone, "update SCP history", true);
312312
if (slotIndex != 0)

src/ledger/LedgerManagerImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ LedgerManagerImpl::applyLedger(LedgerCloseData const& ledgerData,
921921
// Subtle: after this call, `header` is invalidated, and is not safe to use
922922
auto txResultSet = applyTransactions(*applicableTxSet, mutableTxResults,
923923
ltx, ledgerCloseMeta);
924-
if (mApp.getConfig().modeStoresHistory())
924+
if (mApp.getConfig().MODE_STORES_HISTORY_MISC)
925925
{
926926
auto ledgerSeq = ltx.loadHeader().current().ledgerSeq;
927927
mApp.getHistoryManager().appendTransactionSet(ledgerSeq, txSet,

src/main/ApplicationImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ ApplicationImpl::validateAndLogConfig()
725725

726726
if (getHistoryArchiveManager().publishEnabled())
727727
{
728-
if (!mConfig.modeStoresHistory())
728+
if (!mConfig.MODE_STORES_HISTORY_MISC)
729729
{
730730
throw std::invalid_argument(
731731
"Core is not configured to store history, but "

src/main/CommandHandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ CommandHandler::CommandHandler(Application& app) : mApp(app)
8585
}
8686

8787
mServer->add404(std::bind(&CommandHandler::fileNotFound, this, _1, _2));
88-
if (mApp.getConfig().modeStoresHistory())
88+
if (mApp.getConfig().MODE_STORES_HISTORY_MISC)
8989
{
9090
addRoute("maintenance", &CommandHandler::maintenance);
9191
}

src/main/Config.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -2389,12 +2389,6 @@ Config::modeDoesCatchupWithBucketList() const
23892389
return MODE_DOES_CATCHUP && MODE_ENABLES_BUCKETLIST;
23902390
}
23912391

2392-
bool
2393-
Config::modeStoresHistory() const
2394-
{
2395-
return MODE_STORES_HISTORY_MISC;
2396-
}
2397-
23982392
bool
23992393
Config::parallelLedgerClose() const
24002394
{

src/main/Config.h

-1
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ class Config : public std::enable_shared_from_this<Config>
802802

803803
bool modeDoesCatchupWithBucketList() const;
804804
bool isPersistingBucketListDBIndexes() const;
805-
bool modeStoresHistory() const;
806805
void logBasicInfo() const;
807806
bool parallelLedgerClose() const;
808807
void setNoListen();

0 commit comments

Comments
 (0)