Use std::function in JobQueue.

This commit is contained in:
Tom Ritchford
2015-08-09 20:34:54 -04:00
committed by Nik Bougalis
parent 545b2fd6b1
commit a6f866b4d8
4 changed files with 15 additions and 16 deletions

View File

@@ -642,11 +642,14 @@ void LedgerConsensusImp::handleLCL (uint256 const& lclHash)
// Tell the ledger acquire system that we need the consensus ledger
mAcquiringLedger = mPrevLedgerHash;
getApp().getJobQueue().addJob (jtADVANCE, "getConsensusLedger",
std::bind (
&InboundLedgers::acquire,
&getApp().getInboundLedgers(),
mPrevLedgerHash, 0, InboundLedger::fcCONSENSUS));
auto& previousHash = mPrevLedgerHash;
auto acquire = [previousHash] (Job&) {
getApp().getInboundLedgers().acquire(
previousHash, 0, InboundLedger::fcCONSENSUS);
};
getApp().getJobQueue().addJob (
jtADVANCE, "getConsensusLedger", acquire);
;
mHaveCorrectLCL = false;
}
return;