Files
xahaud/src/ripple/basics
Vinnie Falco babaac9305 Refactor Ledger and support classes:
This performs a deep refactor on the Ledger class and its supporting
classes, in preparation for the move to shared_ptr<SLE const> in
places where the SLE is immutable and we are currently using
shared_ptr<SLE>.

Member functions are converted to free functions, the SLECache is an
explicit parameter, one line convenience functions are removed to
streamline the interface. Some callers are changed to use <SLE const>
instead of <SLE>

SLECache:
* Moved to its own header file

RippleState:
* Remove unused functions
* Store the SLE as const
* Simplify callers

AccountState:
* Remove unused members
* Simplify existing members

Ledger:
* Replace writeBack with insert and update
* Remove unused functions
* Remove LedgerStateParams
* Move getLastFullLedger to Application
* add entryCacheI, exists, fetch, erase
* Use boost::optional where it makes sense
* Make member functions free functions

Free functions:
* fetch: cache-aware SLE retrieval
* forEachItem, forEachItemAfter
* (various)
2015-06-08 17:25:16 -07:00
..
2015-06-02 16:52:22 -07:00
2015-05-22 11:09:50 -07:00
2015-05-22 11:09:50 -07:00
2015-03-16 20:54:15 -04:00
2015-02-02 17:01:17 -08:00
2015-05-22 11:09:50 -07:00
2015-05-22 11:09:50 -07:00
2015-05-22 11:09:50 -07:00
2015-03-09 17:49:39 -04:00
2015-05-22 11:09:50 -07:00
2015-05-22 11:09:50 -07:00
2015-06-02 16:52:22 -07:00
2015-06-02 16:52:22 -07:00
2015-04-10 19:11:28 -07:00
2015-05-22 11:09:50 -07:00
2015-03-26 12:38:33 -04:00
2015-01-05 11:46:11 -08:00
2015-03-02 16:49:56 -05:00

Basics

Utility functions and classes.

ripple/basic should contain no dependencies on other modules.

Choosing a rippled 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::vector or std::deque except for those cases.
  • std::set

    • For sorted containers.
  • ripple::hash_set

    • Where inserts and contains need to be O(1).
    • For "small" sets, std::set might be faster and smaller.
  • ripple::hardened_hash_set

The following container is deprecated

  • std::unordered_set
  • Use ripple::hash_set instead, which uses a better hashing algorithm.
  • Or use ripple::hardened_hash_set to prevent algorithmic complexity attacks.