Fix incorrect capture in handleLCL

This commit is contained in:
JoelKatz
2015-10-15 12:45:31 -07:00
committed by Vinnie Falco
parent 8296041f9e
commit 3e8e2c2fee

View File

@@ -653,12 +653,14 @@ void LedgerConsensusImp::handleLCL (uint256 const& lclHash)
// Tell the ledger acquire system that we need the consensus ledger
mAcquiringLedger = mPrevLedgerHash;
auto& previousHash = mPrevLedgerHash;
auto app = &app_;
auto hash = mAcquiringLedger;
app_.getJobQueue().addJob (
jtADVANCE, "getConsensusLedger",
[&] (Job&) {
app_.getInboundLedgers().acquire(
previousHash, 0, InboundLedger::fcCONSENSUS);
[app, hash] (Job&) {
app->getInboundLedgers().acquire(
hash, 0, InboundLedger::fcCONSENSUS);
});
mHaveCorrectLCL = false;