mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use lambdas everywhere in JobQueue.
Conflicts: src/ripple/app/ledger/impl/LedgerConsensusImp.cpp
This commit is contained in:
committed by
Nik Bougalis
parent
a6f866b4d8
commit
c1f50ca7b3
@@ -152,7 +152,7 @@ public:
|
||||
//
|
||||
|
||||
// Must complete immediately.
|
||||
void submitTransaction (Job&, STTx::pointer) override;
|
||||
void submitTransaction (STTx::pointer) override;
|
||||
|
||||
void processTransaction (
|
||||
Transaction::pointer& transaction,
|
||||
@@ -515,12 +515,12 @@ void NetworkOPsImp::onDeadlineTimer (beast::DeadlineTimer& timer)
|
||||
if (timer == m_heartbeatTimer)
|
||||
{
|
||||
m_job_queue.addJob (jtNETOP_TIMER, "NetOPs.heartbeat",
|
||||
std::bind (&NetworkOPsImp::processHeartbeatTimer, this));
|
||||
[this] (Job&) { processHeartbeatTimer(); });
|
||||
}
|
||||
else if (timer == m_clusterTimer)
|
||||
{
|
||||
m_job_queue.addJob (jtNETOP_CLUSTER, "NetOPs.cluster",
|
||||
std::bind (&NetworkOPsImp::processClusterTimer, this));
|
||||
[this] (Job&) { processClusterTimer(); });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ std::string NetworkOPsImp::strOperatingMode () const
|
||||
return paStatusToken[mMode];
|
||||
}
|
||||
|
||||
void NetworkOPsImp::submitTransaction (Job&, STTx::pointer iTrans)
|
||||
void NetworkOPsImp::submitTransaction (STTx::pointer iTrans)
|
||||
{
|
||||
if (isNeedNetworkLedger ())
|
||||
{
|
||||
@@ -698,14 +698,13 @@ void NetworkOPsImp::submitTransaction (Job&, STTx::pointer iTrans)
|
||||
}
|
||||
}
|
||||
|
||||
m_job_queue.addJob (jtTRANSACTION, "submitTxn",
|
||||
std::bind (&NetworkOPsImp::processTransaction,
|
||||
this,
|
||||
std::make_shared<Transaction> (trans, Validate::NO,
|
||||
directSigVerify, reason),
|
||||
false,
|
||||
false,
|
||||
FailHard::no));
|
||||
auto tx = std::make_shared<Transaction> (
|
||||
trans, Validate::NO, directSigVerify, reason);
|
||||
|
||||
m_job_queue.addJob (jtTRANSACTION, "submitTxn", [this, tx] (Job&) {
|
||||
auto t = tx;
|
||||
processTransaction(t, false, false, FailHard::no);
|
||||
});
|
||||
}
|
||||
|
||||
void NetworkOPsImp::processTransaction (Transaction::pointer& transaction,
|
||||
@@ -763,7 +762,7 @@ void NetworkOPsImp::doTransactionAsync (Transaction::pointer transaction,
|
||||
if (mDispatchState == DispatchState::none)
|
||||
{
|
||||
m_job_queue.addJob (jtBATCH, "transactionBatch",
|
||||
std::bind (&NetworkOPsImp::transactionBatch, this));
|
||||
[this] (Job&) { transactionBatch(); });
|
||||
mDispatchState = DispatchState::scheduled;
|
||||
}
|
||||
}
|
||||
@@ -795,7 +794,7 @@ void NetworkOPsImp::doTransactionSync (Transaction::pointer transaction,
|
||||
{
|
||||
// More transactions need to be applied, but by another job.
|
||||
m_job_queue.addJob (jtBATCH, "transactionBatch",
|
||||
std::bind (&NetworkOPsImp::transactionBatch, this));
|
||||
[this] (Job&) { transactionBatch(); });
|
||||
mDispatchState = DispatchState::scheduled;
|
||||
}
|
||||
}
|
||||
@@ -2163,7 +2162,7 @@ void NetworkOPsImp::reportFeeChange ()
|
||||
|
||||
m_job_queue.addJob (
|
||||
jtCLIENT, "reportFeeChange->pubServer",
|
||||
std::bind (&NetworkOPsImp::pubServer, this));
|
||||
[this] (Job&) { pubServer(); });
|
||||
}
|
||||
|
||||
// This routine should only be used to publish accepted or validated
|
||||
|
||||
Reference in New Issue
Block a user