rippled
rippled copied to clipboard
Refactor `HashRouter` flags to be more type-safe
Summary
Currently the HashRouter flags are all just integers: https://github.com/XRPLF/rippled/blob/develop/src/xrpld/app/misc/HashRouter.h#L34-L45
They should be refactored to an enum instead, so that it's easier to validate that they don't clash with other flags or anything else (if they were, you would need explicit type-casting in those places). Since they are currently just ints, this is difficult to do.
https://github.com/XRPLF/rippled/pull/5371
Resolved by #5371