Make only one version of each ledger history option.

This commit is contained in:
JoelKatz
2012-11-30 15:26:18 -08:00
parent 41fe8f4443
commit 5957a79584
2 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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<uint32>(strTemp);