20 #include <ripple/app/tx/applySteps.h>
21 #include <ripple/app/tx/impl/ApplyContext.h>
22 #include <ripple/app/tx/impl/CancelCheck.h>
23 #include <ripple/app/tx/impl/CancelOffer.h>
24 #include <ripple/app/tx/impl/CashCheck.h>
25 #include <ripple/app/tx/impl/Change.h>
26 #include <ripple/app/tx/impl/CreateCheck.h>
27 #include <ripple/app/tx/impl/CreateOffer.h>
28 #include <ripple/app/tx/impl/CreateTicket.h>
29 #include <ripple/app/tx/impl/DeleteAccount.h>
30 #include <ripple/app/tx/impl/DepositPreauth.h>
31 #include <ripple/app/tx/impl/Escrow.h>
32 #include <ripple/app/tx/impl/PayChan.h>
33 #include <ripple/app/tx/impl/Payment.h>
34 #include <ripple/app/tx/impl/SetAccount.h>
35 #include <ripple/app/tx/impl/SetRegularKey.h>
36 #include <ripple/app/tx/impl/SetSignerList.h>
37 #include <ripple/app/tx/impl/SetTrust.h>
75 return T::makeTxConsequences(ctx);
82 auto const tec = T::preflight(ctx);
94 return invoke_preflight_helper<DeleteAccount>(ctx);
96 return invoke_preflight_helper<SetAccount>(ctx);
98 return invoke_preflight_helper<CancelCheck>(ctx);
100 return invoke_preflight_helper<CashCheck>(ctx);
102 return invoke_preflight_helper<CreateCheck>(ctx);
104 return invoke_preflight_helper<DepositPreauth>(ctx);
106 return invoke_preflight_helper<CancelOffer>(ctx);
108 return invoke_preflight_helper<CreateOffer>(ctx);
110 return invoke_preflight_helper<EscrowCreate>(ctx);
112 return invoke_preflight_helper<EscrowFinish>(ctx);
114 return invoke_preflight_helper<EscrowCancel>(ctx);
116 return invoke_preflight_helper<PayChanClaim>(ctx);
118 return invoke_preflight_helper<PayChanCreate>(ctx);
120 return invoke_preflight_helper<PayChanFund>(ctx);
122 return invoke_preflight_helper<Payment>(ctx);
124 return invoke_preflight_helper<SetRegularKey>(ctx);
126 return invoke_preflight_helper<SetSignerList>(ctx);
128 return invoke_preflight_helper<CreateTicket>(ctx);
130 return invoke_preflight_helper<SetTrust>(ctx);
134 return invoke_preflight_helper<Change>(ctx);
160 if (
id != beast::zero)
165 result = T::checkSeqProxy(ctx.
view, ctx.
tx, ctx.
j);
171 result = T::checkPriorTxAndLastLedger(ctx);
181 result = T::checkSign(ctx);
187 return T::preclaim(ctx);
193 switch (ctx.tx.getTxnType())
196 return invoke_preclaim<DeleteAccount>(ctx, seqChk);
198 return invoke_preclaim<SetAccount>(ctx, seqChk);
200 return invoke_preclaim<CancelCheck>(ctx, seqChk);
202 return invoke_preclaim<CashCheck>(ctx, seqChk);
204 return invoke_preclaim<CreateCheck>(ctx, seqChk);
206 return invoke_preclaim<DepositPreauth>(ctx, seqChk);
208 return invoke_preclaim<CancelOffer>(ctx, seqChk);
210 return invoke_preclaim<CreateOffer>(ctx, seqChk);
212 return invoke_preclaim<EscrowCreate>(ctx, seqChk);
214 return invoke_preclaim<EscrowFinish>(ctx, seqChk);
216 return invoke_preclaim<EscrowCancel>(ctx, seqChk);
218 return invoke_preclaim<PayChanClaim>(ctx, seqChk);
220 return invoke_preclaim<PayChanCreate>(ctx, seqChk);
222 return invoke_preclaim<PayChanFund>(ctx, seqChk);
224 return invoke_preclaim<Payment>(ctx, seqChk);
226 return invoke_preclaim<SetRegularKey>(ctx, seqChk);
228 return invoke_preclaim<SetSignerList>(ctx, seqChk);
230 return invoke_preclaim<CreateTicket>(ctx, seqChk);
232 return invoke_preclaim<SetTrust>(ctx, seqChk);
236 return invoke_preclaim<Change>(ctx, seqChk);
247 return T::checkSeqProxy(view, tx, j);
256 return invoke_seqCheck<DeleteAccount>(view, tx, j);
258 return invoke_seqCheck<SetAccount>(view, tx, j);
260 return invoke_seqCheck<CancelCheck>(view, tx, j);
262 return invoke_seqCheck<CashCheck>(view, tx, j);
264 return invoke_seqCheck<CreateCheck>(view, tx, j);
266 return invoke_seqCheck<DepositPreauth>(view, tx, j);
268 return invoke_seqCheck<CancelOffer>(view, tx, j);
270 return invoke_seqCheck<CreateOffer>(view, tx, j);
272 return invoke_seqCheck<EscrowCreate>(view, tx, j);
274 return invoke_seqCheck<EscrowFinish>(view, tx, j);
276 return invoke_seqCheck<EscrowCancel>(view, tx, j);
278 return invoke_seqCheck<PayChanClaim>(view, tx, j);
280 return invoke_seqCheck<PayChanCreate>(view, tx, j);
282 return invoke_seqCheck<PayChanFund>(view, tx, j);
284 return invoke_seqCheck<Payment>(view, tx, j);
286 return invoke_seqCheck<SetRegularKey>(view, tx, j);
288 return invoke_seqCheck<SetSignerList>(view, tx, j);
290 return invoke_seqCheck<CreateTicket>(view, tx, j);
292 return invoke_seqCheck<SetTrust>(view, tx, j);
296 return invoke_seqCheck<Change>(view, tx, j);
359 , potentialSpend_(
beast::zero)
361 , sequencesConsumed_(0)
371 , potentialSpend_(
beast::zero)
372 , seqProx_(tx.getSeqProxy())
373 , sequencesConsumed_(tx.getSeqProxy().isSeq() ? 1 : 0)
503 JLOG(j.
fatal()) <<
"apply: " << e.
what();
514 boost::optional<PreclaimContext const> ctx;
521 preflightResult.
flags,
538 preflightResult.
flags,
544 return {*ctx, ctx->preflightResult};
549 JLOG(ctx->j.fatal()) <<
"apply: " << e.
what();
596 return {preclaimResult.
ter,
false};
603 preclaimResult.
flags,
609 JLOG(preclaimResult.
j.
fatal()) <<
"apply: " << e.
what();