rippled icon indicating copy to clipboard operation
rippled copied to clipboard

HashRouter flags refactor

Open vlntb opened this issue 9 months ago • 1 comments

High Level Overview of Change

This change is addressing the issue #5336 : Refactor HashRouter flags to be more type-safe

  • Switched numeric flags to enum type
  • Updated unit tests

Context of Change

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] Refactor (non-breaking change that only restructures code)
  • [ ] Performance (increase or change in throughput and/or latency)
  • [ ] Tests (you added tests for code that already exists, or your new feature included in this PR)
  • [ ] Documentation update
  • [ ] Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • [ ] Release

API Impact

  • [ ] Public API: New feature (new methods and/or new fields)
  • [ ] Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • [ ] libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • [ ] Peer protocol change (must be backward compatible or bump the peer protocol version)

vlntb avatar Mar 27 '25 15:03 vlntb

Codecov Report

Attention: Patch coverage is 68.08511% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.4%. Comparing base (7ff4f79) to head (b0e86cf). Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 11 Missing :warning:
src/xrpld/app/misc/NetworkOPs.cpp 55.6% 4 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5371     +/-   ##
=========================================
- Coverage     78.4%   78.4%   -0.0%     
=========================================
  Files          816     816             
  Lines        71715   71734     +19     
  Branches      8577    8579      +2     
=========================================
+ Hits         56250   56262     +12     
- Misses       15465   15472      +7     
Files with missing lines Coverage Δ
src/xrpld/app/ledger/Ledger.cpp 82.9% <100.0%> (+<0.1%) :arrow_up:
src/xrpld/app/misc/HashRouter.cpp 100.0% <100.0%> (ø)
src/xrpld/app/misc/HashRouter.h 100.0% <100.0%> (ø)
src/xrpld/app/tx/detail/Escrow.cpp 93.6% <100.0%> (ø)
src/xrpld/app/tx/detail/apply.cpp 93.3% <100.0%> (ø)
src/xrpld/overlay/detail/PeerImp.h 13.2% <ø> (ø)
src/xrpld/app/misc/NetworkOPs.cpp 70.4% <55.6%> (-<0.1%) :arrow_down:
src/xrpld/overlay/detail/PeerImp.cpp 3.7% <0.0%> (-<0.1%) :arrow_down:

... and 6 files with indirect coverage changes

Impacted file tree graph

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 03 '25 14:04 codecov[bot]