refactor: collapse transactions.macro settings into a TxSettings struct

This commit is contained in:
Mayukha Vadari
2026-08-10 22:26:54 -04:00
parent 9c292fbe4f
commit 90a202cf14
9 changed files with 396 additions and 346 deletions

View File

@@ -47,6 +47,7 @@
#include <xrpl/protocol/SecretKey.h>
#include <xrpl/protocol/TER.h>
#include <xrpl/protocol/TxFlags.h>
#include <xrpl/protocol/TxSettings.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/protocol/jss.h>
@@ -2718,19 +2719,24 @@ class Delegate_test : public beast::unit_test::Suite
std::size_t delegableCount = 0;
#pragma push_macro("UNWRAP")
#undef UNWRAP
#pragma push_macro("TRANSACTION")
#undef TRANSACTION
#define TRANSACTION(tag, value, name, txDelegable, ...) \
if (txDelegable == xrpl::Delegable) \
{ \
delegableCount++; \
#define UNWRAP(...) __VA_ARGS__
#define TRANSACTION(tag, value, name, settings, ...) \
if ((xrpl::TxSettings UNWRAP settings).delegable == xrpl::Delegable) \
{ \
delegableCount++; \
}
#include <xrpl/protocol/detail/transactions.macro>
#undef TRANSACTION
#pragma pop_macro("TRANSACTION")
#undef UNWRAP
#pragma pop_macro("UNWRAP")
// ====================================================================
// IMPORTANT NOTICE: