refactor: add `rpcName` to `LEDGER_ENTRY` macro
High Level Overview of Change
The new LEDGER_ENTRY macro now takes one additional parameter, rpcName. This makes it easier to avoid missing including the new field in jss.h and to the list of account_objects/ledger_data filters.
Context of Change
Prevent easy bugs.
Type of Change
- [x] Refactor (non-breaking change that only restructures code)
API Impact
No change to the user.
Test Plan
All tests still pass.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.8%. Comparing base (
49e0d54) to head (a1a203d).
Additional details and impacted files
@@ Coverage Diff @@
## develop #5202 +/- ##
=========================================
- Coverage 77.9% 77.8% -0.1%
=========================================
Files 783 783
Lines 66707 66707
Branches 8140 8139 -1
=========================================
- Hits 51964 51929 -35
- Misses 14743 14778 +35
| Files with missing lines | Coverage Δ | |
|---|---|---|
| include/xrpl/protocol/detail/ledger_entries.macro | 100.0% <100.0%> (ø) |
|
| src/libxrpl/protocol/LedgerFormats.cpp | 100.0% <ø> (ø) |
|
| src/xrpld/rpc/detail/RPCHelpers.cpp | 82.8% <ø> (ø) |
Looks like Windows tests are failing. I'm not sure how to resolve that.
The Windows error is this bug. Below is the fix, to go in ledger_entries.macro:
#ifndef LEDGER_ENTRY_DUPLICATE
#define EXPAND(x) x
#define LEDGER_ENTRY_DUPLICATE(...) EXPAND(LEDGER_ENTRY(__VA_ARGS__))
#endif
...
#undef EXPAND
#undef LEDGER_ENTRY_DUPLICATE
@bthomee this PR is ready to merge