mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Stash and apply proposals received with a different LCL.
This commit is contained in:
@@ -813,7 +813,12 @@ void LedgerConsensus::Saccept(boost::shared_ptr<LedgerConsensus> This, SHAMap::p
|
||||
|
||||
void LedgerConsensus::deferProposal(const LedgerProposal::pointer& proposal, const NewcoinAddress& peerPublic)
|
||||
{
|
||||
/**/
|
||||
if (!peerPublic.isValid())
|
||||
return;
|
||||
std::list<LedgerProposal::pointer>& props = mDeferredProposals[peerPublic.getNodeID()];
|
||||
if (props.size() > (mPreviousProposers + 10))
|
||||
props.pop_front();
|
||||
props.push_back(proposal);
|
||||
}
|
||||
|
||||
void LedgerConsensus::playbackProposals()
|
||||
@@ -821,7 +826,15 @@ void LedgerConsensus::playbackProposals()
|
||||
for ( boost::unordered_map< uint160, std::list<LedgerProposal::pointer> >::iterator
|
||||
it = mDeferredProposals.begin(), end = mDeferredProposals.end(); it != end; ++it)
|
||||
{
|
||||
/**/
|
||||
BOOST_FOREACH(const LedgerProposal::pointer& proposal, it->second)
|
||||
{
|
||||
proposal->setPrevLedger(mPrevLedgerHash);
|
||||
if (proposal->checkSign())
|
||||
{
|
||||
Log(lsINFO) << "Applying deferred proposal";
|
||||
peerPosition(proposal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user