mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 09:46:53 +00:00
* XRPLF/ximinez/number-fix-maxrepcusp: Fix more AMM tests, and to not exclude fixCleanup3_2_0 docs: Add --parallel flag to cmake build commands in BUILD.md (7302) fix: Fix wrong hybrid offer orderbook placement and update `LedgerStateFix` to amend `ExchangeRate` meta (7087) Change the priority of the amendments for large mantissas Apply suggestions from @Tapanito code review Apply suggestions from Copilot code review Review feedback from @tapanito: lambda checks condition in doRoundUp style: More clang-tidy identifier renaming (7290) fix: Update pDEX invariant firing under a valid offer deletion (7118) fix: Fix multisign and signfor to check for delegate (7064) refactor: Fix `sfGeneric` and `sfInvalid` field names (7300) docs: Fix some comments to improve readability (7122) feat: Propagate underlying MPT flags to vault shares (7077)
Basics
Utility functions and classes.
The module xrpl/basics should contain no dependencies on other modules.
Choosing an xrpld container.
-
std::vector- For ordered containers with most insertions or erases at the end.
-
std::deque- For ordered containers with most insertions or erases at the start or end.
-
std::list- For ordered containers with inserts and erases to the middle.
- For containers with iterators stable over insert and erase.
- Generally slower and bigger than
std::vectororstd::dequeexcept for those cases.
-
std::set- For sorted containers.
-
xrpl::hash_set- Where inserts and contains need to be O(1).
- For "small" sets,
std::setmight be faster and smaller.
-
xrpl::hardened_hash_set- For data sets where the key could be manipulated by an attacker in an attempt to mount an algorithmic complexity attack: see http://en.wikipedia.org/wiki/Algorithmic_complexity_attack
The following container is deprecated
std::unordered_set- Use
xrpl::hash_setinstead, which uses a better hashing algorithm. - Or use
xrpl::hardened_hash_setto prevent algorithmic complexity attacks.