mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-07 20:42:49 +00:00
Compare commits
23 Commits
develop
...
mvadari/mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
068c583a20 | ||
|
|
691bcb2bea | ||
|
|
b452bd0b44 | ||
|
|
3bbe525d3d | ||
|
|
0fc901ec7e | ||
|
|
bca7c2925b | ||
|
|
0ccc59268b | ||
|
|
4103fd87a8 | ||
|
|
2b60bf9ab9 | ||
|
|
e8f5ee9e67 | ||
|
|
396a4812a6 | ||
|
|
6b0f230573 | ||
|
|
155f2e8f44 | ||
|
|
24fa6b5ac4 | ||
|
|
29eb6ed47b | ||
|
|
e2d913eb6e | ||
|
|
7517d013b2 | ||
|
|
f441563747 | ||
|
|
f2a36a2433 | ||
|
|
05d661cb3f | ||
|
|
fd0ebc85d2 | ||
|
|
8e45eddc62 | ||
|
|
21dfb60bf1 |
@@ -1,15 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <xrpl/ledger/View.h>
|
||||
#include <xrpl/protocol/Rules.h>
|
||||
#include <xrpl/protocol/st.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
struct PreflightContext;
|
||||
|
||||
// Lending protocol has dependencies, so capture them here.
|
||||
bool
|
||||
checkLendingProtocolDependencies(PreflightContext const& ctx);
|
||||
checkLendingProtocolDependencies(Rules const& rules, STTx const& tx);
|
||||
|
||||
static constexpr std::uint32_t secondsInYear = 365 * 24 * 60 * 60;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/tx/Transactor.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
// DO NOT REMOVE forces header file include to sort first
|
||||
#include <xrpl/tx/transactors/vault/VaultCreate.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
//
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
checkLendingProtocolDependencies(PreflightContext const& ctx)
|
||||
checkLendingProtocolDependencies(Rules const& rules, STTx const& tx)
|
||||
{
|
||||
return ctx.rules.enabled(featureSingleAssetVault) && VaultCreate::checkExtraFeatures(ctx);
|
||||
if (!rules.enabled(featureSingleAssetVault))
|
||||
return false;
|
||||
|
||||
if (!rules.enabled(featureMPTokensV1))
|
||||
return false;
|
||||
|
||||
if (tx.isFieldPresent(sfDomainID) && !rules.enabled(featurePermissionedDomains))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
LoanPaymentParts&
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanBrokerCoverClawback.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanBrokerCoverClawback::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanBrokerCoverDeposit.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanBrokerCoverDeposit::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
//
|
||||
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
|
||||
#include <xrpl/ledger/helpers/CredentialHelpers.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
#include <xrpl/tx/transactors/payment/Payment.h>
|
||||
|
||||
namespace xrpl {
|
||||
@@ -12,7 +12,7 @@ namespace xrpl {
|
||||
bool
|
||||
LoanBrokerCoverWithdraw::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanBrokerDelete.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanBrokerDelete::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanBrokerSet.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanBrokerSet::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanDelete.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanDelete::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
NotTEC
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanManage.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/protocol/TxFlags.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanManage::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
std::uint32_t
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanPay.h>
|
||||
//
|
||||
#include <xrpl/json/to_string.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/Protocol.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/protocol/TxFlags.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
#include <xrpl/tx/transactors/lending/LoanManage.h>
|
||||
|
||||
#include <bit>
|
||||
@@ -15,7 +15,7 @@ namespace xrpl {
|
||||
bool
|
||||
LoanPay::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
std::uint32_t
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#include <xrpl/tx/transactors/lending/LoanSet.h>
|
||||
//
|
||||
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/ledger/helpers/TokenHelpers.h>
|
||||
#include <xrpl/protocol/STTakesAsset.h>
|
||||
#include <xrpl/protocol/TxFlags.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
bool
|
||||
LoanSet::checkExtraFeatures(PreflightContext const& ctx)
|
||||
{
|
||||
return checkLendingProtocolDependencies(ctx);
|
||||
return checkLendingProtocolDependencies(ctx.rules, ctx.tx);
|
||||
}
|
||||
|
||||
std::uint32_t
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#include <test/jtx/mpt.h>
|
||||
|
||||
#include <xrpl/beast/xor_shift_engine.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/protocol/SField.h>
|
||||
#include <xrpl/server/LoadFeeTrack.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
#include <xrpl/tx/transactors/lending/LoanSet.h>
|
||||
#include <xrpl/tx/transactors/system/Batch.h>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include <test/jtx/mpt.h>
|
||||
|
||||
#include <xrpl/beast/xor_shift_engine.h>
|
||||
#include <xrpl/ledger/helpers/LendingHelpers.h>
|
||||
#include <xrpl/protocol/SField.h>
|
||||
#include <xrpl/server/LoadFeeTrack.h>
|
||||
#include <xrpl/tx/transactors/lending/LendingHelpers.h>
|
||||
#include <xrpl/tx/transactors/lending/LoanSet.h>
|
||||
#include <xrpl/tx/transactors/system/Batch.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user