mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Support "standalone" mode (-a or --standalone) in which we do not connect
to the network and do not close ledgers. This mode makes it much easier to test transactions as they are only applied once to the open ledger.
This commit is contained in:
@@ -84,6 +84,7 @@ int main(int argc, char* argv[])
|
||||
int iResult = 0;
|
||||
po::variables_map vm; // Map of options.
|
||||
bool bTest = false;
|
||||
theConfig.init();
|
||||
|
||||
//
|
||||
// Set up option parsing.
|
||||
@@ -93,6 +94,7 @@ int main(int argc, char* argv[])
|
||||
("help,h", "Display this message.")
|
||||
("conf", po::value<std::string>(), "Specify the configuration file.")
|
||||
("rpc", "Perform rpc command (default).")
|
||||
("standalone,a", "Run with no peers.")
|
||||
("test,t", "Perform unit tests.")
|
||||
("parameters", po::value< vector<string> >(), "Specify comma separated parameters.")
|
||||
("verbose,v", "Increase log level")
|
||||
@@ -142,6 +144,11 @@ int main(int argc, char* argv[])
|
||||
Log::setMinSeverity(lsTRACE);
|
||||
}
|
||||
|
||||
if (vm.count("standalone"))
|
||||
{
|
||||
theConfig.RUN_STANDALONE = true;
|
||||
}
|
||||
|
||||
if (!iResult)
|
||||
{
|
||||
theConfig.setup(vm.count("conf") ? vm["conf"].as<std::string>() : "");
|
||||
|
||||
Reference in New Issue
Block a user