mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 09:16:47 +00:00
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <xrpl/tx/Transactor.h>
|
|
|
|
namespace xrpl {
|
|
|
|
class Payment : public Transactor
|
|
{
|
|
/* The largest number of paths we allow */
|
|
static std::size_t const MaxPathSize = 6;
|
|
|
|
/* The longest path we allow */
|
|
static std::size_t const MaxPathLength = 8;
|
|
|
|
public:
|
|
static constexpr ConsequencesFactoryType ConsequencesFactory{Custom};
|
|
|
|
explicit Payment(ApplyContext& ctx) : Transactor(ctx)
|
|
{
|
|
}
|
|
|
|
static TxConsequences
|
|
makeTxConsequences(PreflightContext const& ctx);
|
|
|
|
static bool
|
|
checkExtraFeatures(PreflightContext const& ctx);
|
|
|
|
static std::uint32_t
|
|
getFlagsMask(PreflightContext const& ctx);
|
|
|
|
static NotTEC
|
|
preflight(PreflightContext const& ctx);
|
|
|
|
static NotTEC
|
|
checkPermission(ReadView const& view, STTx const& tx);
|
|
|
|
static TER
|
|
preclaim(PreclaimContext const& ctx);
|
|
|
|
TER
|
|
doApply() override;
|
|
|
|
void
|
|
visitInvariantEntry(
|
|
bool isDelete,
|
|
std::shared_ptr<SLE const> const& before,
|
|
std::shared_ptr<SLE const> const& after) override;
|
|
|
|
[[nodiscard]] bool
|
|
finalizeInvariants(
|
|
STTx const& tx,
|
|
TER result,
|
|
XRPAmount fee,
|
|
ReadView const& view,
|
|
beast::Journal const& j) override;
|
|
};
|
|
|
|
} // namespace xrpl
|