-
Notifications
You must be signed in to change notification settings - Fork 1.6k
refactor: clean up TxMeta
#5845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TxMeta
TxMetaTxMeta constructors
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5845 +/- ##
=========================================
- Coverage 78.3% 78.3% -0.0%
=========================================
Files 817 817
Lines 69003 68989 -14
Branches 8318 8318
=========================================
- Hits 54028 54016 -12
+ Misses 14975 14973 -2
🚀 New features to boost your workflow:
|
TxMeta constructorsTxMeta
vvysokikh1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! small nit can be ignored
src/libxrpl/protocol/TxMeta.cpp
Outdated
| if (index != -1) | ||
| { | ||
| auto inner = dynamic_cast<STObject const*>(&it.peekAtIndex(index)); | ||
| auto inner = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto const *inner
This change: * Simplifies the `TxMeta` constructors - both were setting the same set of fields, and to make it harder for future bugs to arise and keep the code DRY, we can combine those into one helper function. * Removes an unused constructor. * Renames the variables to avoid Hungarian naming. * Removes a bunch of now-unnecessary helper functions.
High Level Overview of Change
This PR:
TxMetaconstructors - both were setting the same set of fields, and to make it harder for future bugs to arise and keep the code DRY, we can combine those into one helper function.Context of Change
DRY, pulled out of #5600
Type of Change
API Impact
N/A
Test Plan
CI passes.