mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Differentiate the two beginConsensus cases. (Ledger close or network
showing consensus traffic.)
This commit is contained in:
@@ -319,7 +319,7 @@ void NetworkOPs::checkState(const boost::system::error_code& result)
|
||||
Ledger::pointer currentLedger = theApp->getMasterLedger().getCurrentLedger();
|
||||
if (getNetworkTimeNC() >= currentLedger->getCloseTimeNC())
|
||||
{
|
||||
setStateTimer(beginConsensus(currentLedger));
|
||||
setStateTimer(beginConsensus(currentLedger, false));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ void NetworkOPs::switchLastClosedLedger(Ledger::pointer newLedger)
|
||||
}
|
||||
// vim:ts=4
|
||||
|
||||
int NetworkOPs::beginConsensus(Ledger::pointer closingLedger)
|
||||
int NetworkOPs::beginConsensus(Ledger::pointer closingLedger, bool isEarly)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cerr << "Ledger close time for ledger " << closingLedger->getLedgerSeq() << std::endl;
|
||||
@@ -409,8 +409,8 @@ bool NetworkOPs::proposeLedger(uint32 closingSeq, uint32 proposeSeq, const uint2
|
||||
if (!mConsensus)
|
||||
{
|
||||
if ((getNetworkTimeNC() + 2) >= currentLedger->getCloseTimeNC())
|
||||
setStateTimer(beginConsensus(currentLedger));
|
||||
if (!mConsensus) return true;
|
||||
setStateTimer(beginConsensus(currentLedger, true));
|
||||
if (!mConsensus) return false;
|
||||
}
|
||||
|
||||
return mConsensus->peerPosition(proposal);
|
||||
|
||||
Reference in New Issue
Block a user