mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -62,10 +62,10 @@ void Application::stop()
|
||||
{
|
||||
cLog(lsINFO) << "Received shutdown request";
|
||||
mIOService.stop();
|
||||
mJobQueue.shutdown();
|
||||
mHashedObjectStore.bulkWrite();
|
||||
mValidations.flush();
|
||||
mAuxService.stop();
|
||||
mJobQueue.shutdown();
|
||||
|
||||
cLog(lsINFO) << "Stopped: " << mIOService.stopped();
|
||||
Instance::shutdown();
|
||||
@@ -122,9 +122,9 @@ void Application::setup()
|
||||
boost::thread t5(boost::bind(&InitDB, &mHashNodeDB, "hashnode.db", HashNodeDBInit, HashNodeDBCount));
|
||||
boost::thread t6(boost::bind(&InitDB, &mNetNodeDB, "netnode.db", NetNodeDBInit, NetNodeDBCount));
|
||||
t1.join(); t2.join(); t3.join(); t4.join(); t5.join(); t6.join();
|
||||
mTxnDB->getDB()->setupCheckpointing();
|
||||
mLedgerDB->getDB()->setupCheckpointing();
|
||||
mHashNodeDB->getDB()->setupCheckpointing();
|
||||
mTxnDB->getDB()->setupCheckpointing(&mJobQueue);
|
||||
mLedgerDB->getDB()->setupCheckpointing(&mJobQueue);
|
||||
mHashNodeDB->getDB()->setupCheckpointing(&mJobQueue);
|
||||
|
||||
if (theConfig.START_UP == Config::FRESH)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ JobQueue::JobQueue() : mLastJob(0), mThreadCount(0), mShuttingDown(false)
|
||||
mJobLoads[jtTRANSACTION].setTargetLatency(250, 1000);
|
||||
mJobLoads[jtPROPOSAL_ut].setTargetLatency(500, 1250);
|
||||
mJobLoads[jtPUBLEDGER].setTargetLatency(1000, 2500);
|
||||
mJobLoads[jtWAL].setTargetLatency(1000, 2500);
|
||||
mJobLoads[jtVALIDATION_t].setTargetLatency(500, 1500);
|
||||
mJobLoads[jtWRITE].setTargetLatency(750, 1500);
|
||||
mJobLoads[jtTRANSACTION_l].setTargetLatency(100, 500);
|
||||
@@ -41,6 +42,7 @@ const char* Job::toString(JobType t)
|
||||
case jtTRANSACTION: return "transaction";
|
||||
case jtPUBLEDGER: return "publishLedger";
|
||||
case jtVALIDATION_t: return "trustedValidation";
|
||||
case jtWAL: return "writeAhead";
|
||||
case jtWRITE: return "writeObjects";
|
||||
case jtTRANSACTION_l: return "localTransaction";
|
||||
case jtPROPOSAL_t: return "trustedProposal";
|
||||
|
||||
@@ -27,12 +27,13 @@ enum JobType
|
||||
jtCLIENT = 4, // A websocket command from the client
|
||||
jtTRANSACTION = 5, // A transaction received from the network
|
||||
jtPUBLEDGER = 6, // Publish a fully-accepted ledger
|
||||
jtVALIDATION_t = 7, // A validation from a trusted source
|
||||
jtWRITE = 8, // Write out hashed objects
|
||||
jtTRANSACTION_l = 9, // A local transaction
|
||||
jtPROPOSAL_t = 10, // A proposal from a trusted source
|
||||
jtADMIN = 11, // An administrative operation
|
||||
jtDEATH = 12, // job of death, used internally
|
||||
jtWAL = 7, // Write-ahead logging
|
||||
jtVALIDATION_t = 8, // A validation from a trusted source
|
||||
jtWRITE = 9, // Write out hashed objects
|
||||
jtTRANSACTION_l = 10, // A local transaction
|
||||
jtPROPOSAL_t = 11, // A proposal from a trusted source
|
||||
jtADMIN = 12, // An administrative operation
|
||||
jtDEATH = 13, // job of death, used internally
|
||||
|
||||
// special types not dispatched by the job pool
|
||||
jtPEER = 17,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
// Put at the beginning of a C++ file that needs its own log partition
|
||||
#define SETUP_LOG() static LogPartition logPartition(__FILE__)
|
||||
#define SETUP_NLOG(x) static LogPartition logPartition(x)
|
||||
|
||||
// Standard conditional log
|
||||
#define cLog(x) if (!logPartition.doLog(x)) do {} while (0); else Log(x, logPartition)
|
||||
|
||||
Reference in New Issue
Block a user