Add --quorum command line argument (RIPD-563)

This commit is contained in:
Nik Bougalis
2014-09-19 03:30:26 -07:00
committed by Vinnie Falco
parent da4f77ca1f
commit 47b08bfc02
2 changed files with 10 additions and 0 deletions

View File

@@ -1311,6 +1311,7 @@ public:
void setMinValidations (int v)
{
WriteLog (lsINFO, LedgerMaster) << "Validation quorum: " << v;
mMinValidations = v;
}

View File

@@ -192,6 +192,7 @@ int run (int argc, char** argv)
("unittest-format", po::value <std::string> ()->implicit_value ("text"), "Format unit test output. Choices are 'text', 'junit'")
("parameters", po::value< vector<string> > (), "Specify comma separated parameters.")
("quiet,q", "Reduce diagnotics.")
("quorum", po::value <int> (), "Set the validation quorum.")
("verbose,v", "Verbose logging.")
("load", "Load the current ledger from the local DB.")
("replay","Replay a ledger close.")
@@ -352,6 +353,14 @@ int run (int argc, char** argv)
// VFALCO TODO This should be a short.
getConfig ().setRpcPort (vm ["rpc_port"].as <int> ());
}
if (vm.count ("quorum"))
{
getConfig ().VALIDATION_QUORUM = vm["quorum"].as <int> ();
if (getConfig ().VALIDATION_QUORUM < 0)
iResult = 1;
}
}
if (iResult == 0)