mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Avoid an extraneous dispatch to the same context we're already in.
Get rid of stored proposals in a more sane way.
This commit is contained in:
@@ -1043,6 +1043,8 @@ void LedgerConsensus::accept(SHAMap::ref set, LoadEvent::pointer)
|
|||||||
boost::recursive_mutex::scoped_lock masterLock(theApp->getMasterLock());
|
boost::recursive_mutex::scoped_lock masterLock(theApp->getMasterLock());
|
||||||
assert(set->getHash() == mOurPosition->getCurrentHash());
|
assert(set->getHash() == mOurPosition->getCurrentHash());
|
||||||
|
|
||||||
|
theApp->getOPs().peekStoredProposals().clear(); // these are now obsolete
|
||||||
|
|
||||||
uint32 closeTime = roundCloseTime(mOurPosition->getCloseTime());
|
uint32 closeTime = roundCloseTime(mOurPosition->getCloseTime());
|
||||||
bool closeTimeCorrect = true;
|
bool closeTimeCorrect = true;
|
||||||
if (closeTime == 0)
|
if (closeTime == 0)
|
||||||
|
|||||||
@@ -1100,11 +1100,7 @@ static void checkPropose(Job& job, boost::shared_ptr<ripple::TMProposeSet> packe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isTrusted)
|
if (isTrusted)
|
||||||
{
|
theApp->getOPs().processTrustedProposal(proposal, packet, nodePublic, prevLedger, sigGood);
|
||||||
theApp->getJobQueue().addJob(jtPROPOSAL_t, "trustedProposal",
|
|
||||||
BIND_TYPE(&NetworkOPs::processTrustedProposal, &theApp->getOPs(),
|
|
||||||
proposal, packet, nodePublic, prevLedger, sigGood));
|
|
||||||
}
|
|
||||||
else if (sigGood && (prevLedger == consensusLCL))
|
else if (sigGood && (prevLedger == consensusLCL))
|
||||||
{ // relay untrusted proposal
|
{ // relay untrusted proposal
|
||||||
WriteLog (lsTRACE, Peer) << "relaying untrusted proposal";
|
WriteLog (lsTRACE, Peer) << "relaying untrusted proposal";
|
||||||
|
|||||||
Reference in New Issue
Block a user