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