mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rename Transactor preflight functions
- Rename Transactor::preflight to invokePreflight. - Rename doPreflight back to preflight. - Update instructions. - With preflight1 & 2 now uncallable, in-flight code in other branches should be easier to convert.
This commit is contained in:
@@ -3571,7 +3571,7 @@ private:
|
||||
env.current()->rules(),
|
||||
tapNONE,
|
||||
env.journal);
|
||||
auto pf = Transactor::preflight<AMMBid>(pfctx);
|
||||
auto pf = Transactor::invokePreflight<AMMBid>(pfctx);
|
||||
BEAST_EXPECT(pf == temDISABLED);
|
||||
env.app().config().features.insert(featureAMM);
|
||||
}
|
||||
@@ -3586,7 +3586,7 @@ private:
|
||||
env.current()->rules(),
|
||||
tapNONE,
|
||||
env.journal);
|
||||
auto pf = Transactor::preflight<AMMBid>(pfctx);
|
||||
auto pf = Transactor::invokePreflight<AMMBid>(pfctx);
|
||||
BEAST_EXPECT(pf != tesSUCCESS);
|
||||
}
|
||||
|
||||
@@ -3601,7 +3601,7 @@ private:
|
||||
env.current()->rules(),
|
||||
tapNONE,
|
||||
env.journal);
|
||||
auto pf = Transactor::preflight<AMMBid>(pfctx);
|
||||
auto pf = Transactor::invokePreflight<AMMBid>(pfctx);
|
||||
BEAST_EXPECT(pf == temBAD_AMM_TOKENS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ AMMBid::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMBid::doPreflight(PreflightContext const& ctx)
|
||||
AMMBid::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const res = invalidAMMAssetPair(
|
||||
ctx.tx[sfAsset].get<Issue>(), ctx.tx[sfAsset2].get<Issue>()))
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -46,7 +46,7 @@ AMMClawback::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMClawback::doPreflight(PreflightContext const& ctx)
|
||||
AMMClawback::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
AccountID const issuer = ctx.tx[sfAccount];
|
||||
AccountID const holder = ctx.tx[sfHolder];
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -38,7 +38,7 @@ AMMCreate::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMCreate::doPreflight(PreflightContext const& ctx)
|
||||
AMMCreate::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const amount = ctx.tx[sfAmount];
|
||||
auto const amount2 = ctx.tx[sfAmount2];
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static XRPAmount
|
||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -34,7 +34,7 @@ AMMDelete::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMDelete::doPreflight(PreflightContext const& ctx)
|
||||
AMMDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -43,7 +43,7 @@ AMMDeposit::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMDeposit::doPreflight(PreflightContext const& ctx)
|
||||
AMMDeposit::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const flags = ctx.tx.getFlags();
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -34,7 +34,7 @@ AMMVote::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMVote::doPreflight(PreflightContext const& ctx)
|
||||
AMMVote::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const res = invalidAMMAssetPair(
|
||||
ctx.tx[sfAsset].get<Issue>(), ctx.tx[sfAsset2].get<Issue>()))
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -41,7 +41,7 @@ AMMWithdraw::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
AMMWithdraw::doPreflight(PreflightContext const& ctx)
|
||||
AMMWithdraw::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const flags = ctx.tx.getFlags();
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -210,7 +210,7 @@ Batch::getFlagsMask(PreflightContext const& ctx)
|
||||
* code otherwise.
|
||||
*/
|
||||
NotTEC
|
||||
Batch::doPreflight(PreflightContext const& ctx)
|
||||
Batch::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const parentBatchId = ctx.tx.getTransactionID();
|
||||
auto const outerAccount = ctx.tx.getAccountID(sfAccount);
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
checkSign(PreclaimContext const& ctx);
|
||||
|
||||
@@ -36,7 +36,7 @@ CancelCheck::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CancelCheck::doPreflight(PreflightContext const& ctx)
|
||||
CancelCheck::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
namespace ripple {
|
||||
|
||||
NotTEC
|
||||
CancelOffer::doPreflight(PreflightContext const& ctx)
|
||||
CancelOffer::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (!ctx.tx[sfOfferSequence])
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
}
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -39,7 +39,7 @@ CashCheck::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CashCheck::doPreflight(PreflightContext const& ctx)
|
||||
CashCheck::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
// Exactly one of Amount or DeliverMin must be present.
|
||||
auto const optAmount = ctx.tx[~sfAmount];
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace ripple {
|
||||
|
||||
template <>
|
||||
NotTEC
|
||||
Transactor::preflight<Change>(PreflightContext const& ctx)
|
||||
Transactor::invokePreflight<Change>(PreflightContext const& ctx)
|
||||
{
|
||||
// 0 means "Allow any flags"
|
||||
// The check for tfChangeMask is gated by LendingProtocol because that
|
||||
|
||||
@@ -88,7 +88,7 @@ Clawback::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
Clawback::doPreflight(PreflightContext const& ctx)
|
||||
Clawback::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const ret = std::visit(
|
||||
[&]<typename T>(T const&) { return preflightHelper<T>(ctx); },
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -35,7 +35,7 @@ CreateCheck::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CreateCheck::doPreflight(PreflightContext const& ctx)
|
||||
CreateCheck::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfAccount] == ctx.tx[sfDestination])
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -70,7 +70,7 @@ CreateOffer::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CreateOffer::doPreflight(PreflightContext const& ctx)
|
||||
CreateOffer::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto& tx = ctx.tx;
|
||||
auto& j = ctx.j;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
/** Enforce constraints beyond those of the Transactor base class. */
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
/** Enforce constraints beyond those of the Transactor base class. */
|
||||
static TER
|
||||
|
||||
@@ -40,7 +40,7 @@ CreateTicket::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CreateTicket::doPreflight(PreflightContext const& ctx)
|
||||
CreateTicket::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (std::uint32_t const count = ctx.tx[sfTicketCount];
|
||||
count < minValidCount || count > maxValidCount)
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
/** Enforce constraints beyond those of the Transactor base class. */
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
/** Enforce constraints beyond those of the Transactor base class. */
|
||||
static TER
|
||||
|
||||
@@ -62,7 +62,7 @@ CredentialCreate::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CredentialCreate::doPreflight(PreflightContext const& ctx)
|
||||
CredentialCreate::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const& tx = ctx.tx;
|
||||
auto& j = ctx.j;
|
||||
@@ -213,7 +213,7 @@ CredentialDelete::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CredentialDelete::doPreflight(PreflightContext const& ctx)
|
||||
CredentialDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const subject = ctx.tx[~sfSubject];
|
||||
auto const issuer = ctx.tx[~sfIssuer];
|
||||
@@ -297,7 +297,7 @@ CredentialAccept::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
CredentialAccept::doPreflight(PreflightContext const& ctx)
|
||||
CredentialAccept::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (!ctx.tx[sfIssuer])
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -49,7 +49,7 @@ DIDSet::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DIDSet::doPreflight(PreflightContext const& ctx)
|
||||
DIDSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (!ctx.tx.isFieldPresent(sfURI) &&
|
||||
!ctx.tx.isFieldPresent(sfDIDDocument) && !ctx.tx.isFieldPresent(sfData))
|
||||
@@ -175,7 +175,7 @@ DIDDelete::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DIDDelete::doPreflight(PreflightContext const& ctx)
|
||||
DIDDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
TER
|
||||
doApply() override;
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
deleteSLE(ApplyContext& ctx, Keylet sleKeylet, AccountID const owner);
|
||||
|
||||
@@ -35,7 +35,7 @@ DelegateSet::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DelegateSet::doPreflight(PreflightContext const& ctx)
|
||||
DelegateSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const& permissions = ctx.tx.getFieldArray(sfPermissions);
|
||||
if (permissions.size() > permissionMaxSize)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -49,7 +49,7 @@ DeleteAccount::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DeleteAccount::doPreflight(PreflightContext const& ctx)
|
||||
DeleteAccount::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfAccount] == ctx.tx[sfDestination])
|
||||
// An account cannot be deleted and give itself the resulting XRP.
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static XRPAmount
|
||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -33,7 +33,7 @@ DeleteOracle::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DeleteOracle::doPreflight(PreflightContext const& ctx)
|
||||
DeleteOracle::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -46,7 +46,7 @@ DepositPreauth::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
DepositPreauth::doPreflight(PreflightContext const& ctx)
|
||||
DepositPreauth::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
bool const authArrPresent = ctx.tx.isFieldPresent(sfAuthorizeCredentials);
|
||||
bool const unauthArrPresent =
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -126,7 +126,7 @@ EscrowCreate::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
EscrowCreate::doPreflight(PreflightContext const& ctx)
|
||||
EscrowCreate::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
STAmount const amount{ctx.tx[sfAmount]};
|
||||
if (!isXRP(amount))
|
||||
@@ -640,7 +640,7 @@ EscrowFinish::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
EscrowFinish::doPreflight(PreflightContext const& ctx)
|
||||
EscrowFinish::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const cb = ctx.tx[~sfCondition];
|
||||
auto const fb = ctx.tx[~sfFulfillment];
|
||||
@@ -1202,7 +1202,7 @@ EscrowCancel::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
EscrowCancel::doPreflight(PreflightContext const& ctx)
|
||||
EscrowCancel::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static XRPAmount
|
||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -34,7 +34,7 @@ LedgerStateFix::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LedgerStateFix::doPreflight(PreflightContext const& ctx)
|
||||
LedgerStateFix::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
switch (ctx.tx[sfLedgerFixType])
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static XRPAmount
|
||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -49,7 +49,7 @@ LoanBrokerCoverDeposit::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanBrokerCoverDeposit::doPreflight(PreflightContext const& ctx)
|
||||
LoanBrokerCoverDeposit::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanBrokerID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -49,7 +49,7 @@ LoanBrokerCoverWithdraw::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanBrokerCoverWithdraw::doPreflight(PreflightContext const& ctx)
|
||||
LoanBrokerCoverWithdraw::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanBrokerID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -49,7 +49,7 @@ LoanBrokerDelete::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanBrokerDelete::doPreflight(PreflightContext const& ctx)
|
||||
LoanBrokerDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -52,7 +52,7 @@ LoanBrokerSet::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanBrokerSet::doPreflight(PreflightContext const& ctx)
|
||||
LoanBrokerSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const& tx = ctx.tx;
|
||||
if (auto const data = tx[~sfData]; data && !data->empty() &&
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -51,7 +51,7 @@ LoanDelete::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanDelete::doPreflight(PreflightContext const& ctx)
|
||||
LoanDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -51,7 +51,7 @@ LoanDraw::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanDraw::doPreflight(PreflightContext const& ctx)
|
||||
LoanDraw::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -58,7 +58,7 @@ LoanManage::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanManage::doPreflight(PreflightContext const& ctx)
|
||||
LoanManage::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -51,7 +51,7 @@ LoanPay::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanPay::doPreflight(PreflightContext const& ctx)
|
||||
LoanPay::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfLoanID] == beast::zero)
|
||||
return temINVALID;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -59,7 +59,7 @@ LoanSet::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
LoanSet::doPreflight(PreflightContext const& ctx)
|
||||
LoanSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const& tx = ctx.tx;
|
||||
auto const counterPartySig = ctx.tx.getFieldObject(sfCounterpartySignature);
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
checkSign(PreclaimContext const& ctx);
|
||||
|
||||
@@ -39,7 +39,7 @@ MPTokenAuthorize::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
MPTokenAuthorize::doPreflight(PreflightContext const& ctx)
|
||||
MPTokenAuthorize::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.tx[sfAccount] == ctx.tx[~sfHolder])
|
||||
return temMALFORMED;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -38,7 +38,7 @@ MPTokenIssuanceCreate::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
MPTokenIssuanceCreate::doPreflight(PreflightContext const& ctx)
|
||||
MPTokenIssuanceCreate::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const fee = ctx.tx[~sfTransferFee])
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
TER
|
||||
doApply() override;
|
||||
|
||||
@@ -38,7 +38,7 @@ MPTokenIssuanceDestroy::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
MPTokenIssuanceDestroy::doPreflight(PreflightContext const& ctx)
|
||||
MPTokenIssuanceDestroy::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -38,7 +38,7 @@ MPTokenIssuanceSet::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
MPTokenIssuanceSet::doPreflight(PreflightContext const& ctx)
|
||||
MPTokenIssuanceSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const txFlags = ctx.tx.getFlags();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
checkPermission(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -40,7 +40,7 @@ NFTokenAcceptOffer::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenAcceptOffer::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenAcceptOffer::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const bo = ctx.tx[~sfNFTokenBuyOffer];
|
||||
auto const so = ctx.tx[~sfNFTokenSellOffer];
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -33,7 +33,7 @@ NFTokenBurn::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenBurn::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenBurn::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -41,7 +41,7 @@ NFTokenCancelOffer::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenCancelOffer::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenCancelOffer::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const& ids = ctx.tx[sfNFTokenOffers];
|
||||
ids.empty() || (ids.size() > maxTokenOfferCancelCount))
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -39,7 +39,7 @@ NFTokenCreateOffer::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenCreateOffer::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenCreateOffer::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const txFlags = ctx.tx.getFlags();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -84,7 +84,7 @@ NFTokenMint::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenMint::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenMint::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto const f = ctx.tx[~sfTransferFee])
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -33,7 +33,7 @@ NFTokenModify::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
NFTokenModify::doPreflight(PreflightContext const& ctx)
|
||||
NFTokenModify::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto owner = ctx.tx[~sfOwner]; owner == ctx.tx[sfAccount])
|
||||
return temMALFORMED;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -179,7 +179,7 @@ PayChanCreate::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
PayChanCreate::doPreflight(PreflightContext const& ctx)
|
||||
PayChanCreate::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (!isXRP(ctx.tx[sfAmount]) || (ctx.tx[sfAmount] <= beast::zero))
|
||||
return temBAD_AMOUNT;
|
||||
@@ -335,7 +335,7 @@ PayChanFund::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
PayChanFund::doPreflight(PreflightContext const& ctx)
|
||||
PayChanFund::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (!isXRP(ctx.tx[sfAmount]) || (ctx.tx[sfAmount] <= beast::zero))
|
||||
return temBAD_AMOUNT;
|
||||
@@ -433,7 +433,7 @@ PayChanClaim::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
PayChanClaim::doPreflight(PreflightContext const& ctx)
|
||||
PayChanClaim::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const bal = ctx.tx[~sfBalance];
|
||||
if (bal && (!isXRP(*bal) || *bal <= beast::zero))
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
TER
|
||||
doApply() override;
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -90,7 +90,7 @@ Payment::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
Payment::doPreflight(PreflightContext const& ctx)
|
||||
Payment::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto& tx = ctx.tx;
|
||||
auto& j = ctx.j;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
checkPermission(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -31,7 +31,7 @@ PermissionedDomainDelete::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
PermissionedDomainDelete::doPreflight(PreflightContext const& ctx)
|
||||
PermissionedDomainDelete::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const domain = ctx.tx.getFieldH256(sfDomainID);
|
||||
if (domain == beast::zero)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -36,7 +36,7 @@ PermissionedDomainSet::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
PermissionedDomainSet::doPreflight(PreflightContext const& ctx)
|
||||
PermissionedDomainSet::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (auto err = credentials::checkArray(
|
||||
ctx.tx.getFieldArray(sfAcceptedCredentials),
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -64,7 +64,7 @@ SetAccount::getFlagsMask(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
SetAccount::doPreflight(PreflightContext const& ctx)
|
||||
SetAccount::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto& tx = ctx.tx;
|
||||
auto& j = ctx.j;
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
getFlagsMask(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
checkPermission(ReadView const& view, STTx const& tx);
|
||||
|
||||
@@ -43,7 +43,7 @@ SetOracle::isEnabled(PreflightContext const& ctx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
SetOracle::doPreflight(PreflightContext const& ctx)
|
||||
SetOracle::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
auto const& dataSeries = ctx.tx.getFieldArray(sfPriceDataSeries);
|
||||
if (dataSeries.empty())
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
isEnabled(PreflightContext const& ctx);
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static TER
|
||||
preclaim(PreclaimContext const& ctx);
|
||||
|
||||
@@ -49,7 +49,7 @@ SetRegularKey::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
}
|
||||
|
||||
NotTEC
|
||||
SetRegularKey::doPreflight(PreflightContext const& ctx)
|
||||
SetRegularKey::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
if (ctx.rules.enabled(fixMasterKeyAsRegularKey) &&
|
||||
ctx.tx.isFieldPresent(sfRegularKey) &&
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
}
|
||||
|
||||
static NotTEC
|
||||
doPreflight(PreflightContext const& ctx);
|
||||
preflight(PreflightContext const& ctx);
|
||||
|
||||
static XRPAmount
|
||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user