mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add path test for issue #23.
This commit is contained in:
@@ -525,6 +525,11 @@ TER LedgerEntrySet::dirAdd(
|
||||
const uint256& uLedgerIndex,
|
||||
boost::function<void (SLE::ref)> fDescriber)
|
||||
{
|
||||
cLog(lsDEBUG)
|
||||
<< boost::str(boost::format("dirAdd: uRootIndex=%s uLedgerIndex=%s")
|
||||
% uRootIndex.ToString()
|
||||
% uLedgerIndex.ToString());
|
||||
|
||||
SLE::pointer sleNode;
|
||||
STVector256 svIndexes;
|
||||
SLE::pointer sleRoot = entryCache(ltDIR_NODE, uRootIndex);
|
||||
|
||||
@@ -531,10 +531,6 @@ void LedgerMaster::pubThread()
|
||||
cLog(lsDEBUG) << "Publishing ledger " << l->getLedgerSeq();
|
||||
setFullLedger(l); // OPTIMIZEME: This is actually more work than we need to do
|
||||
theApp->getOPs().pubLedger(l);
|
||||
BOOST_FOREACH(callback& c, mOnValidate)
|
||||
{
|
||||
c(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,11 +229,16 @@ TER OfferCreateTransactor::takeOffers(
|
||||
}
|
||||
}
|
||||
|
||||
cLog(lsINFO) << "takeOffers: " << transToken(terResult);
|
||||
|
||||
// On storing meta data, delete offers that were found unfunded to prevent encountering them in future.
|
||||
if (tesSUCCESS == terResult)
|
||||
{
|
||||
BOOST_FOREACH(const uint256& uOfferIndex, usOfferUnfundedFound)
|
||||
{
|
||||
|
||||
cLog(lsINFO) << "takeOffers: found unfunded: " << uOfferIndex.ToString();
|
||||
|
||||
terResult = mEngine->getNodes().offerDelete(uOfferIndex);
|
||||
if (tesSUCCESS != terResult)
|
||||
break;
|
||||
@@ -245,12 +250,16 @@ TER OfferCreateTransactor::takeOffers(
|
||||
// On success, delete offers that became unfunded.
|
||||
BOOST_FOREACH(const uint256& uOfferIndex, usOfferUnfundedBecame)
|
||||
{
|
||||
cLog(lsINFO) << "takeOffers: became unfunded: " << uOfferIndex.ToString();
|
||||
|
||||
terResult = mEngine->getNodes().offerDelete(uOfferIndex);
|
||||
if (tesSUCCESS != terResult)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cLog(lsINFO) << "takeOffers< " << transToken(terResult);
|
||||
|
||||
return terResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user