Support for proposals that contain the previous ledger hash.

A fix for ledger acquires not stopping when they should.
This commit is contained in:
JoelKatz
2012-09-03 06:03:09 -07:00
parent 7d6259d8b3
commit cc4827559c
5 changed files with 43 additions and 14 deletions

View File

@@ -860,12 +860,17 @@ void LedgerConsensus::playbackProposals()
{
BOOST_FOREACH(const LedgerProposal::pointer& proposal, it->second)
{
proposal->setPrevLedger(mPrevLedgerHash);
if (proposal->checkSign())
{
Log(lsINFO) << "Applying deferred proposal";
peerPosition(proposal);
if (proposal->hasSignature())
{ // old-style
proposal->setPrevLedger(mPrevLedgerHash);
if (proposal->checkSign())
{
Log(lsINFO) << "Applying deferred proposal";
peerPosition(proposal);
}
}
else if (proposal->isPrevLedger(mPrevLedgerHash))
peerPosition(proposal);
}
}
}