diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index c9db9ac288..04f9649d01 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -206,10 +206,10 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::pointer pre { mHaveCorrectLCL = mProposing = mValidating = false; mAcquiringLedger = theApp->getMasterLedgerAcquire().findCreate(prevLCLHash); - std::vector peers=theApp->getConnectionPool().getPeerVector(); + std::vector peerList = theApp->getConnectionPool().getPeerVector(); for (std::vector::const_iterator it = peerList.begin(), end = peerList.end(); it != end; ++it) - if (((*it)->hasLedger(closedLedger)) - mAcquiringLedger->peerHash(*it); + if ((*it)->hasLedger(prevLCLHash)) + mAcquiringLedger->peerHas(*it); } else if (mValSeed.isValid()) {