diff --git a/rippled-example.cfg b/rippled-example.cfg index 0bbd0f5dd..7234df1a1 100644 --- a/rippled-example.cfg +++ b/rippled-example.cfg @@ -109,6 +109,12 @@ # Examples: RASH BUSH MILK LOOK BAD BRIM AVID GAFF BAIT ROT POD LOVE # shfArahZT9Q9ckTf3s1psJ7C7qzVN # +# [ledger_history]: +# To serve clients, servers need historical ledger data. This sets the number of +# past ledgers to acquire on server startup and the minimum to maintain while +# running. Servers that don't need to serve clients can set this to "none". +# Servers that want complete history can set this to "full". +# The default is 256 ledgers [peer_ip] 0.0.0.0 diff --git a/src/cpp/ripple/Config.cpp b/src/cpp/ripple/Config.cpp index 0304de7b4..4701634fb 100644 --- a/src/cpp/ripple/Config.cpp +++ b/src/cpp/ripple/Config.cpp @@ -296,9 +296,9 @@ void Config::load() if (sectionSingleB(secConfig, SECTION_LEDGER_HISTORY, strTemp)) { boost::to_lower(strTemp); - if ((strTemp == "no") || (strTemp == "none") || (strTemp == "off") || (strTemp == "false")) + if (strTemp == "none") LEDGER_HISTORY = 0; - else if ((strTemp == "yes") || (strTemp == "full") || (strTemp == "on") || (strTemp == "-1")) + else if (strTemp == "full") LEDGER_HISTORY = 1000000000u; else LEDGER_HISTORY = boost::lexical_cast(strTemp);