Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ripple/app/ledger/LedgerMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,7 @@ class LedgerMasterImp

void setMinValidations (int v)
{
WriteLog (lsINFO, LedgerMaster) << "Validation quorum: " << v;
mMinValidations = v;
}

Expand Down
9 changes: 9 additions & 0 deletions src/ripple/app/main/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand Down