File tree Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -783,14 +783,12 @@ LedgerManagerImpl::getExpectedLedgerCloseTime() const
783783{
784784 releaseAssert (threadIsMain ());
785785
786- #ifdef BUILD_TESTS
787786 auto const & cfg = mApp .getConfig ();
788787 if (auto overrideOp = cfg.getExpectedLedgerCloseTimeTestingOverride ();
789788 overrideOp.has_value ())
790789 {
791790 return *overrideOp;
792791 }
793- #endif
794792
795793 auto const & lcl = getLastClosedLedgerHeader ();
796794 if (protocolVersionStartsFrom (lcl.header .ledgerVersion ,
Original file line number Diff line number Diff line change @@ -2660,6 +2660,8 @@ Config::generateQuorumSetForTesting(
26602660 setValidatorWeightConfig (validators);
26612661}
26622662
2663+ #endif // BUILD_TESTS
2664+
26632665std::optional<std::chrono::milliseconds>
26642666Config::getExpectedLedgerCloseTimeTestingOverride () const
26652667{
@@ -2676,7 +2678,6 @@ Config::getExpectedLedgerCloseTimeTestingOverride() const
26762678
26772679 return std::nullopt ;
26782680}
2679- #endif // BUILD_TESTS
26802681
26812682std::string const Config::STDIN_SPECIAL_NAME = " stdin" ;
26822683}
Original file line number Diff line number Diff line change @@ -850,11 +850,12 @@ class Config : public std::enable_shared_from_this<Config>
850850 void
851851 generateQuorumSetForTesting (std::vector<ValidatorEntry> const & validators);
852852
853+ #endif
854+
853855 // Returns ledger close time if an override value is currently set for
854856 // testing. Otherwise returns nullopt.
855857 std::optional<std::chrono::milliseconds>
856858 getExpectedLedgerCloseTimeTestingOverride () const ;
857- #endif
858859
859860#ifdef BEST_OFFER_DEBUGGING
860861 bool BEST_OFFER_DEBUGGING_ENABLED;
Original file line number Diff line number Diff line change @@ -79,13 +79,11 @@ getSurveyThrottleTimeoutMs(Application& app)
7979 auto estimatedCloseTime =
8080 Herder::TARGET_LEDGER_CLOSE_TIME_BEFORE_PROTOCOL_VERSION_23_MS;
8181
82- #ifdef BUILD_TESTS
8382 if (auto overrideOp = cfg.getExpectedLedgerCloseTimeTestingOverride ();
8483 overrideOp.has_value ())
8584 {
8685 estimatedCloseTime = *overrideOp;
8786 }
88- #endif
8987
9088 return estimatedCloseTime * SurveyManager::SURVEY_THROTTLE_TIMEOUT_MULT;
9189}
You can’t perform that action at this time.
0 commit comments