mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
guard changes with HooksUpdate1 amendment
This commit is contained in:
@@ -1824,7 +1824,7 @@ finalizeHookResult(
|
||||
}
|
||||
|
||||
// if any txns were emitted then add them to the HookEmissions
|
||||
if (!emission_txnid.empty())
|
||||
if (applyCtx.view().rules().enabled(featureHooksUpdate1) && !emission_txnid.empty())
|
||||
{
|
||||
for (auto const& etxnid : emission_txnid)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,9 @@ Import::preflight(PreflightContext const& ctx)
|
||||
if (!ctx.rules.enabled(featureImport))
|
||||
return temDISABLED;
|
||||
|
||||
if (!ctx.rules.enabled(featureHooksUpdate1) && ctx.tx.isFieldPresent(sfIssuer))
|
||||
return temDISABLED;
|
||||
|
||||
if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
|
||||
return ret;
|
||||
|
||||
@@ -1164,11 +1167,14 @@ Import::doApply()
|
||||
XRPAmount
|
||||
Import::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
{
|
||||
return
|
||||
!view.exists(keylet::account(tx.getAccountID(sfAccount))) &&
|
||||
!tx.isFieldPresent(sfIssuer)
|
||||
? XRPAmount { 0 }
|
||||
: Transactor::calculateBaseFee(view, tx);
|
||||
if (!view.rules().enabled(featureHooksUpdate1))
|
||||
return XRPAmount { 0 };
|
||||
|
||||
if (!view.exists(keylet::account(tx.getAccountID(sfAccount))) &&
|
||||
!tx.isFieldPresent(sfIssuer))
|
||||
return XRPAmount { 0 };
|
||||
|
||||
return Transactor::calculateBaseFee(view, tx);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
Reference in New Issue
Block a user