| 
    rippled
    
   | 
 
Track and use the fee escalation metrics of the current open ledger. More...

Classes | |
| struct | Snapshot | 
| Snapshot of the externally relevant FeeMetrics fields at any given time.  More... | |
Public Member Functions | |
| FeeMetrics (Setup const &setup, beast::Journal j) | |
| Constructor.   | |
| std::size_t | update (Application &app, ReadView const &view, bool timeLeap, TxQ::Setup const &setup) | 
| Updates fee metrics based on the transactions in the ReadView for use in fee escalation calculations.   | |
| Snapshot | getSnapshot () const | 
| Get the current Snapshot.   | |
Static Public Member Functions | |
| static FeeLevel64 | scaleFeeLevel (Snapshot const &snapshot, OpenView const &view) | 
| Use the number of transactions in the current open ledger to compute the fee level a transaction must pay to bypass the queue.   | |
| static std::pair< bool, FeeLevel64 > | escalatedSeriesFeeLevel (Snapshot const &snapshot, OpenView const &view, std::size_t extraCount, std::size_t seriesSize) | 
| Computes the total fee level for all transactions in a series.   | |
Private Attributes | |
| std::size_t const | minimumTxnCount_ | 
| Minimum value of txnsExpected.   | |
| std::size_t const | targetTxnCount_ | 
| Number of transactions per ledger that fee escalation "works
towards".   | |
| std::optional< std::size_t > const | maximumTxnCount_ | 
| Maximum value of txnsExpected.   | |
| std::size_t | txnsExpected_ | 
| Number of transactions expected per ledger.   | |
| boost::circular_buffer< std::size_t > | recentTxnCounts_ | 
| Recent history of transaction counts that exceed the targetTxnCount_.   | |
| FeeLevel64 | escalationMultiplier_ | 
| Based on the median fee of the LCL.   | |
| beast::Journal const | j_ | 
| Journal.   | |
Track and use the fee escalation metrics of the current open ledger.
Does the work of scaling fees as the open ledger grows.
| ripple::TxQ::FeeMetrics::FeeMetrics | ( | Setup const & | setup, | 
| beast::Journal | j | ||
| ) | 
| std::size_t ripple::TxQ::FeeMetrics::update | ( | Application & | app, | 
| ReadView const & | view, | ||
| bool | timeLeap, | ||
| TxQ::Setup const & | setup | ||
| ) | 
Updates fee metrics based on the transactions in the ReadView for use in fee escalation calculations.
| app | Rippled Application object. | 
| view | View of the LCL that was just closed or received. | 
| timeLeap | Indicates that rippled is under load so fees should grow faster. | 
| setup | Customization params. | 
| Snapshot ripple::TxQ::FeeMetrics::getSnapshot | ( | ) | const | 
      
  | 
  static | 
      
  | 
  static | 
Computes the total fee level for all transactions in a series.
Assumes that there are already more than txnsExpected_ txns between the view and extraCount. If there aren't, the result will be sensible (e.g. there won't be any underflows or overflows), but the level will be higher than actually required.
| view | Current open / working ledger. (May be a sandbox.) | 
| extraCount | Number of additional transactions to count as in the ledger. (If view is a sandbox, should be the number of transactions in the parent ledger.)  | 
| seriesSize | Total number of transactions in the series to be processed. | 
std::pair indicating whether the calculation result overflows. 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private |