mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 18:55:49 +00:00
clang-format
This commit is contained in:
@@ -24,15 +24,15 @@
|
|||||||
#include <xrpl/basics/StringUtilities.h>
|
#include <xrpl/basics/StringUtilities.h>
|
||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
#include <xrpl/basics/safe_cast.h>
|
#include <xrpl/basics/safe_cast.h>
|
||||||
#include <xrpl/hook/Enum.h>
|
|
||||||
#include <xrpl/json/to_string.h>
|
|
||||||
#include <xrpl/protocol/Feature.h>
|
|
||||||
#include <xrpl/basics/strHex.h>
|
#include <xrpl/basics/strHex.h>
|
||||||
#include <xrpl/beast/utility/Zero.h>
|
#include <xrpl/beast/utility/Zero.h>
|
||||||
#include <xrpl/beast/utility/instrumentation.h>
|
#include <xrpl/beast/utility/instrumentation.h>
|
||||||
|
#include <xrpl/hook/Enum.h>
|
||||||
#include <xrpl/json/json_value.h>
|
#include <xrpl/json/json_value.h>
|
||||||
|
#include <xrpl/json/to_string.h>
|
||||||
#include <xrpl/protocol/AccountID.h>
|
#include <xrpl/protocol/AccountID.h>
|
||||||
#include <xrpl/protocol/Batch.h>
|
#include <xrpl/protocol/Batch.h>
|
||||||
|
#include <xrpl/protocol/Feature.h>
|
||||||
#include <xrpl/protocol/HashPrefix.h>
|
#include <xrpl/protocol/HashPrefix.h>
|
||||||
#include <xrpl/protocol/Protocol.h>
|
#include <xrpl/protocol/Protocol.h>
|
||||||
#include <xrpl/protocol/PublicKey.h>
|
#include <xrpl/protocol/PublicKey.h>
|
||||||
@@ -371,8 +371,7 @@ singleSignHelper(
|
|||||||
return Unexpected("Cannot both single- and multi-sign.");
|
return Unexpected("Cannot both single- and multi-sign.");
|
||||||
|
|
||||||
// wildcard network gets a free pass on all signatures
|
// wildcard network gets a free pass on all signatures
|
||||||
bool const isWildcardNetwork =
|
bool const isWildcardNetwork = signer.isFieldPresent(sfNetworkID) &&
|
||||||
signer.isFieldPresent(sfNetworkID) &&
|
|
||||||
signer.getFieldU32(sfNetworkID) == 65535;
|
signer.getFieldU32(sfNetworkID) == 65535;
|
||||||
|
|
||||||
bool validSig = false;
|
bool validSig = false;
|
||||||
@@ -452,8 +451,7 @@ multiSignHelper(
|
|||||||
// Signers must be in sorted order by AccountID.
|
// Signers must be in sorted order by AccountID.
|
||||||
AccountID lastAccountID(beast::zero);
|
AccountID lastAccountID(beast::zero);
|
||||||
|
|
||||||
bool const isWildcardNetwork =
|
bool const isWildcardNetwork = signerObj.isFieldPresent(sfNetworkID) &&
|
||||||
signerObj.isFieldPresent(sfNetworkID) &&
|
|
||||||
signerObj.getFieldU32(sfNetworkID) == 65535;
|
signerObj.getFieldU32(sfNetworkID) == 65535;
|
||||||
|
|
||||||
for (auto const& signer : signers)
|
for (auto const& signer : signers)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ TxMeta::TxMeta(uint256 const& txid, std::uint32_t ledger, STObject const& obj)
|
|||||||
if (obj.isFieldPresent(sfHookEmissions))
|
if (obj.isFieldPresent(sfHookEmissions))
|
||||||
setHookEmissions(obj.getFieldArray(sfHookEmissions));
|
setHookEmissions(obj.getFieldArray(sfHookEmissions));
|
||||||
|
|
||||||
if (obj.isFieldPresent(sfParentBatchID))
|
if (obj.isFieldPresent(sfParentBatchID))
|
||||||
setParentBatchId(obj.getFieldH256(sfParentBatchID));
|
setParentBatchId(obj.getFieldH256(sfParentBatchID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1512,7 +1512,7 @@ NetworkOPsImp::apply(std::unique_lock<std::mutex>& batchLock)
|
|||||||
bool const isEmitted =
|
bool const isEmitted =
|
||||||
hook::isEmittedTxn(*(e.transaction->getSTransaction()));
|
hook::isEmittedTxn(*(e.transaction->getSTransaction()));
|
||||||
if (auto const sttx = *(e.transaction->getSTransaction());
|
if (auto const sttx = *(e.transaction->getSTransaction());
|
||||||
toSkip && !isEmitted &&
|
toSkip && !isEmitted &&
|
||||||
// Skip relaying if it's an inner batch txn and batch
|
// Skip relaying if it's an inner batch txn and batch
|
||||||
// feature is enabled
|
// feature is enabled
|
||||||
!(sttx.isFlag(tfInnerBatchTxn) &&
|
!(sttx.isFlag(tfInnerBatchTxn) &&
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ public:
|
|||||||
TxMeta
|
TxMeta
|
||||||
generateProvisionalMeta()
|
generateProvisionalMeta()
|
||||||
{
|
{
|
||||||
return view_->generateProvisionalMeta(base_, tx, parentBatchId_, journal);
|
return view_->generateProvisionalMeta(
|
||||||
|
base_, tx, parentBatchId_, journal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Applies all invariant checkers one by one.
|
/** Applies all invariant checkers one by one.
|
||||||
|
|||||||
@@ -52,15 +52,15 @@ preflight0(PreflightContext const& ctx)
|
|||||||
if (isPseudoTx(ctx.tx) && ctx.tx.isFlag(tfInnerBatchTxn))
|
if (isPseudoTx(ctx.tx) && ctx.tx.isFlag(tfInnerBatchTxn))
|
||||||
{
|
{
|
||||||
JLOG(ctx.j.warn()) << "Pseudo transactions cannot contain the "
|
JLOG(ctx.j.warn()) << "Pseudo transactions cannot contain the "
|
||||||
"tfInnerBatchTxn flag.";
|
"tfInnerBatchTxn flag.";
|
||||||
return temINVALID_FLAG;
|
return temINVALID_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.tx.isFieldPresent(sfEmitDetails) ||
|
if (ctx.tx.isFieldPresent(sfEmitDetails) ||
|
||||||
ctx.tx.isFlag(tfInnerBatchTxn) || isPseudoTx(ctx.tx))
|
ctx.tx.isFlag(tfInnerBatchTxn) || isPseudoTx(ctx.tx))
|
||||||
{
|
{
|
||||||
// all emitted and inner, pseudo transactions are free to pass, do not need
|
// all emitted and inner, pseudo transactions are free to pass, do not
|
||||||
// network id
|
// need network id
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -318,8 +318,8 @@ ApplyStateTable::apply(
|
|||||||
if (!to.open() || isDryRun)
|
if (!to.open() || isDryRun)
|
||||||
{
|
{
|
||||||
// generate meta
|
// generate meta
|
||||||
auto [meta, newMod] =
|
auto [meta, newMod] = generateTxMeta(
|
||||||
generateTxMeta(to, tx, deliver, hookExecution, hookEmission, parentBatchId, j);
|
to, tx, deliver, hookExecution, hookEmission, parentBatchId, j);
|
||||||
|
|
||||||
if (!isDryRun)
|
if (!isDryRun)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,15 @@ ApplyViewImpl::apply(
|
|||||||
beast::Journal j)
|
beast::Journal j)
|
||||||
{
|
{
|
||||||
return items_.apply(
|
return items_.apply(
|
||||||
to, tx, ter, deliver_, hookExecution_, hookEmission_, parentBatchId, isDryRun, j);
|
to,
|
||||||
|
tx,
|
||||||
|
ter,
|
||||||
|
deliver_,
|
||||||
|
hookExecution_,
|
||||||
|
hookEmission_,
|
||||||
|
parentBatchId,
|
||||||
|
isDryRun,
|
||||||
|
j);
|
||||||
}
|
}
|
||||||
|
|
||||||
TxMeta
|
TxMeta
|
||||||
|
|||||||
Reference in New Issue
Block a user