mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-07 04:05:48 +00:00
Compare commits
1 Commits
patch-ctid
...
patch-rema
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a1f84c1bd |
@@ -498,11 +498,15 @@ RCLConsensus::Adaptor::doAccept(
|
||||
|
||||
for (auto const& item : *result.txns.map_)
|
||||
{
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
retriableTxs.insert(
|
||||
std::make_shared<STTx const>(SerialIter{item.slice()}));
|
||||
JLOG(j_.debug()) << " Tx: " << item.key();
|
||||
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
{
|
||||
@@ -510,6 +514,7 @@ RCLConsensus::Adaptor::doAccept(
|
||||
JLOG(j_.warn())
|
||||
<< " Tx: " << item.key() << " throws: " << ex.what();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
auto built = buildLCL(
|
||||
|
||||
@@ -116,8 +116,10 @@ applyTransactions(
|
||||
{
|
||||
auto const txid = it->first.getTXID();
|
||||
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
if (pass == 0 && built->txExists(txid))
|
||||
{
|
||||
it = txns.erase(it);
|
||||
@@ -140,6 +142,7 @@ applyTransactions(
|
||||
case ApplyResult::Retry:
|
||||
++it;
|
||||
}
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
{
|
||||
@@ -148,6 +151,7 @@ applyTransactions(
|
||||
failed.insert(txid);
|
||||
it = txns.erase(it);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
JLOG(j.debug()) << (certainRetry ? "Pass: " : "Final pass: ") << pass
|
||||
|
||||
@@ -44,7 +44,8 @@ convertBlobsToTxResult(
|
||||
|
||||
auto tr = std::make_shared<Transaction>(txn, reason, app);
|
||||
|
||||
auto metaset = std::make_shared<TxMeta>(tr->getID(), ledger_index, rawMeta);
|
||||
auto metaset =
|
||||
std::make_shared<TxMeta>(tr->getID(), tr->getLedger(), rawMeta);
|
||||
|
||||
// if properly formed meta is available we can use it to generate ctid
|
||||
if (metaset->getAsObject().isFieldPresent(sfTransactionIndex))
|
||||
|
||||
@@ -168,8 +168,10 @@ applyTransaction(
|
||||
JLOG(j.debug()) << "TXN " << txn.getTransactionID()
|
||||
<< (retryAssured ? "/retry" : "/final");
|
||||
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
auto const result = apply(app, view, txn, flags, j);
|
||||
if (result.second)
|
||||
{
|
||||
@@ -189,12 +191,14 @@ applyTransaction(
|
||||
|
||||
JLOG(j.debug()) << "Transaction retry: " << transHuman(result.first);
|
||||
return ApplyResult::Retry;
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
{
|
||||
JLOG(j.warn()) << "Throws: " << ex.what();
|
||||
return ApplyResult::Fail;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
@@ -591,15 +591,19 @@ preflight(
|
||||
{
|
||||
PreflightContext const pfctx(app, tx, rules, flags, j);
|
||||
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
return {pfctx, invoke_preflight(pfctx)};
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
JLOG(j.fatal()) << "apply: " << e.what();
|
||||
return {pfctx, {tefEXCEPTION, TxConsequences{tx}}};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
PreclaimResult
|
||||
@@ -636,17 +640,21 @@ preclaim(
|
||||
preflightResult.j);
|
||||
}
|
||||
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
if (!isTesSuccess(ctx->preflightResult))
|
||||
return {*ctx, ctx->preflightResult};
|
||||
return {*ctx, invoke_preclaim(*ctx)};
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
JLOG(ctx->j.fatal()) << "apply: " << e.what();
|
||||
return {*ctx, tefEXCEPTION};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
XRPAmount
|
||||
@@ -670,8 +678,10 @@ doApply(PreclaimResult const& preclaimResult, Application& app, OpenView& view)
|
||||
// info to recover.
|
||||
return {tefEXCEPTION, false};
|
||||
}
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
if (!preclaimResult.likelyToClaimFee)
|
||||
return {preclaimResult.ter, false};
|
||||
|
||||
@@ -684,12 +694,14 @@ doApply(PreclaimResult const& preclaimResult, Application& app, OpenView& view)
|
||||
preclaimResult.flags,
|
||||
preclaimResult.j);
|
||||
return invoke_apply(ctx);
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
JLOG(preclaimResult.j.fatal()) << "apply: " << e.what();
|
||||
return {tefEXCEPTION, false};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
Reference in New Issue
Block a user