I was trying to understand the stellar code base and was looking for a place where 5 sec slot timing is hardcoded (if I am not wrong). But unable to find that, instead in ovalayManagerImpl.cpp file I found that timer elapsed at every 2 sec.


Am I looking at incorrect file? Also, my second question is what is the rational behind the 5 sec slot timing ?

  • If I recall correctly from keybase, you found that this is the correct place. Right?
    – Synesso
    Commented Jul 20, 2019 at 23:30
  • @Synesso this is not the correct file it seems. The ledger closing time is set from config.cpp file. look at my answer below. now I have to understand why mTimer is set to 2 sec then in OverlayManagerImpl.cpp file. Commented Jul 23, 2019 at 5:34

1 Answer 1


I found method which returns the expected ledger closing time,

Config::getExpectedLedgerCloseTime() const
        return std::chrono::seconds{ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING};
        return std::chrono::seconds{1};

and the value for EXP_LEDGER_TIMESPAN_SECONDS is set to 5 sec - std::chrono::seconds const Herder::EXP_LEDGER_TIMESPAN_SECONDS(5);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.