Cleanups:

* Remove obsolete config variables
* Reduce coupling
* Use C++11 ownership containers
* Use auto when it makes sense
* Detect edge-case in unit tests
* Reduce the number of LedgerEntrySet public members
This commit is contained in:
Nik Bougalis
2014-09-07 17:23:51 -07:00
parent de4be649ab
commit 81a06ea6cd
38 changed files with 326 additions and 438 deletions

View File

@@ -173,10 +173,6 @@ void Config::setup (std::string const& strConf, bool bQuiet)
VALIDATORS_URI = boost::str (boost::format ("/%s") % VALIDATORS_BASE);
SIGN_TRANSACTION = HashPrefix::txSign;
SIGN_VALIDATION = HashPrefix::validation;
SIGN_PROPOSAL = HashPrefix::proposal;
if (!strConf.empty ())
{
// --conf=<path> : everything is relative that file.
@@ -513,7 +509,7 @@ void Config::load ()
PEER_CONNECT_LOW_WATER = std::max (1, beast::lexicalCastThrow <int> (strTemp));
if (SectionSingleB (secConfig, SECTION_NETWORK_QUORUM, strTemp))
NETWORK_QUORUM = std::max (0, beast::lexicalCastThrow <int> (strTemp));
NETWORK_QUORUM = beast::lexicalCastThrow <std::size_t> (strTemp);
if (SectionSingleB (secConfig, SECTION_VALIDATION_QUORUM, strTemp))
VALIDATION_QUORUM = std::max (0, beast::lexicalCastThrow <int> (strTemp));