mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make sure we call checkAccept when we finish acquiring a ledger, in case it's fully-validated.
This commit is contained in:
@@ -230,6 +230,8 @@ static void LADispatch (
|
||||
InboundLedger::pointer la,
|
||||
std::vector< FUNCTION_TYPE<void (InboundLedger::pointer)> > trig)
|
||||
{
|
||||
if (la->isComplete() && !la->isFailed())
|
||||
getApp().getLedgerMaster().checkAccept(la->getLedger()->getHash(), la->getLedger()->getLedgerSeq());
|
||||
for (unsigned int i = 0; i < trig.size (); ++i)
|
||||
trig[i] (la);
|
||||
}
|
||||
@@ -264,9 +266,8 @@ void InboundLedger::done ()
|
||||
getApp().getInboundLedgers ().logFailure (mHash);
|
||||
|
||||
// We hold the PeerSet lock, so must dispatch
|
||||
if (!triggers.empty())
|
||||
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "triggers",
|
||||
BIND_TYPE (LADispatch, P_1, shared_from_this (), triggers));
|
||||
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "triggers",
|
||||
BIND_TYPE (LADispatch, P_1, shared_from_this (), triggers));
|
||||
getApp().getLedgerMaster().tryAdvance();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user