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:
@@ -95,13 +95,14 @@ void Application::run()
|
||||
//
|
||||
// Set up UNL.
|
||||
//
|
||||
getUNL().nodeBootstrap();
|
||||
if (!theConfig.RUN_STANDALONE)
|
||||
getUNL().nodeBootstrap();
|
||||
|
||||
|
||||
//
|
||||
// Allow peer connections.
|
||||
//
|
||||
if (!theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
|
||||
if (!theConfig.RUN_STANDALONE && !theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
|
||||
{
|
||||
mPeerDoor = new PeerDoor(mIOService);
|
||||
}
|
||||
@@ -127,7 +128,8 @@ void Application::run()
|
||||
//
|
||||
// Begin connecting to network.
|
||||
//
|
||||
mConnectionPool.start();
|
||||
if (!theConfig.RUN_STANDALONE)
|
||||
mConnectionPool.start();
|
||||
|
||||
// New stuff.
|
||||
NewcoinAddress rootSeedMaster = NewcoinAddress::createSeedGeneric("masterpassphrase");
|
||||
@@ -155,7 +157,14 @@ void Application::run()
|
||||
}
|
||||
|
||||
|
||||
mNetOps.setStateTimer();
|
||||
if (theConfig.RUN_STANDALONE)
|
||||
{
|
||||
Log(lsWARNING) << "Running in standalone mode";
|
||||
mNetOps.setStandAlone();
|
||||
mMasterLedger.runStandAlone();
|
||||
}
|
||||
else
|
||||
mNetOps.setStateTimer();
|
||||
|
||||
mIOService.run(); // This blocks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user