Put ledgerAdvance jobs in their own class.

This commit is contained in:
JoelKatz
2013-08-13 14:05:32 -07:00
parent e94f895754
commit fcd7522922
4 changed files with 15 additions and 10 deletions

View File

@@ -746,7 +746,7 @@ void LedgerMaster::tryAdvance()
if (!mAdvanceThread && mValidLedger)
{
mAdvanceThread = true;
getApp().getJobQueue ().addJob (jtPUBLEDGER, "Ledger::advanceThread",
getApp().getJobQueue ().addJob (jtADVANCE, "advanceLedger",
BIND_TYPE (&LedgerMaster::advanceThread, this));
}
}

View File

@@ -88,6 +88,9 @@ const char* Job::toString (JobType t)
case jtPUBLEDGER:
return "publishNewLedger";
case jtADVANCE:
return "advanceLedger";
case jtVALIDATION_t:
return "trustedValidation";

View File

@@ -23,14 +23,15 @@ enum JobType
jtUPDATE_PF = 8, // Update pathfinding requests
jtCLIENT = 9, // A websocket command from the client
jtTRANSACTION = 10, // A transaction received from the network
jtPUBLEDGER = 11, // Publish a fully-accepted ledger
jtTXN_DATA = 12, // Fetch a proposed set
jtWAL = 13, // Write-ahead logging
jtVALIDATION_t = 14, // A validation from a trusted source
jtWRITE = 15, // Write out hashed objects
jtPROPOSAL_t = 16, // A proposal from a trusted source
jtSWEEP = 17, // Sweep for stale structures
jtADMIN = 18, // An administrative operation
jtADVANCE = 11, // Advance validated/acquired ledgers
jtPUBLEDGER = 12, // Publish a fully-accepted ledger
jtTXN_DATA = 13, // Fetch a proposed set
jtWAL = 14, // Write-ahead logging
jtVALIDATION_t = 15, // A validation from a trusted source
jtWRITE = 16, // Write out hashed objects
jtPROPOSAL_t = 17, // A proposal from a trusted source
jtSWEEP = 18, // Sweep for stale structures
jtADMIN = 19, // An administrative operation
// special types not dispatched by the job pool
jtPEER = 24,

View File

@@ -454,6 +454,7 @@ int JobQueue::getJobLimit (JobType type)
case jtCLIENT:
case jtTRANSACTION:
case jtPUBLEDGER:
case jtADVANCE:
case jtWAL:
case jtVALIDATION_t:
case jtWRITE: