mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
"Advance" thread to publish ledgers and fetch history.
This commit is contained in:
@@ -235,9 +235,6 @@ static void LADispatch (
|
||||
InboundLedger::pointer la,
|
||||
std::vector< FUNCTION_TYPE<void (InboundLedger::pointer)> > trig)
|
||||
{
|
||||
Ledger::ref ledger = la->getLedger();
|
||||
if (ledger)
|
||||
getApp().getLedgerMaster().checkAccept (ledger->getHash(), ledger->getLedgerSeq());
|
||||
for (unsigned int i = 0; i < trig.size (); ++i)
|
||||
trig[i] (la);
|
||||
}
|
||||
@@ -272,8 +269,10 @@ void InboundLedger::done ()
|
||||
getApp().getInboundLedgers ().logFailure (mHash);
|
||||
|
||||
// We hold the PeerSet lock, so must dispatch
|
||||
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "triggers",
|
||||
BIND_TYPE (LADispatch, P_1, shared_from_this (), triggers));
|
||||
if (!triggers.empty())
|
||||
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "triggers",
|
||||
BIND_TYPE (LADispatch, P_1, shared_from_this (), triggers));
|
||||
getApp().getLedgerMaster().tryAdvance();
|
||||
}
|
||||
|
||||
bool InboundLedger::addOnComplete (FUNCTION_TYPE<void (InboundLedger::pointer)> trigger)
|
||||
|
||||
Reference in New Issue
Block a user