rippled
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
ripple::LoadFeeTrack Class Referencefinal

Manages the current fee schedule. More...

Collaboration diagram for ripple::LoadFeeTrack:
Collaboration graph
[legend]

Public Member Functions

 LoadFeeTrack (beast::Journal journal=beast::Journal(beast::Journal::getNullSink()))
 
 ~LoadFeeTrack ()=default
 
void setRemoteFee (std::uint32_t f)
 
std::uint32_t getRemoteFee () const
 
std::uint32_t getLocalFee () const
 
std::uint32_t getClusterFee () const
 
std::uint32_t getLoadBase () const
 
std::uint32_t getLoadFactor () const
 
std::pair< std::uint32_t, std::uint32_tgetScalingFactors () const
 
void setClusterFee (std::uint32_t fee)
 
bool raiseLocalFee ()
 
bool lowerLocalFee ()
 
bool isLoadedLocal () const
 
bool isLoadedCluster () const
 

Private Attributes

const beast::Journal j_
 
std::mutex lock_
 
std::uint32_t localTxnLoadFee_
 
std::uint32_t remoteTxnLoadFee_
 
std::uint32_t clusterTxnLoadFee_
 
std::uint32_t raiseCount_
 

Static Private Attributes

static constexpr std::uint32_t lftNormalFee
 
static constexpr std::uint32_t lftFeeIncFraction
 
static constexpr std::uint32_t lftFeeDecFraction
 
static constexpr std::uint32_t lftFeeMax = lftNormalFee * 1000000
 

Detailed Description

Manages the current fee schedule.

The "base" fee is the cost to send a reference transaction under no load, expressed in millionths of one XRP.

The "load" fee is how much the local server currently charges to send a reference transaction. This fee fluctuates based on the load of the server.

Definition at line 44 of file LoadFeeTrack.h.

Constructor & Destructor Documentation

◆ LoadFeeTrack()

ripple::LoadFeeTrack::LoadFeeTrack ( beast::Journal  journal = beast::Journal(beast::Journal::getNullSink()))
explicit

Definition at line 47 of file LoadFeeTrack.h.

◆ ~LoadFeeTrack()

ripple::LoadFeeTrack::~LoadFeeTrack ( )
default

Member Function Documentation

◆ setRemoteFee()

void ripple::LoadFeeTrack::setRemoteFee ( std::uint32_t  f)

Definition at line 60 of file LoadFeeTrack.h.

◆ getRemoteFee()

std::uint32_t ripple::LoadFeeTrack::getRemoteFee ( ) const

Definition at line 68 of file LoadFeeTrack.h.

◆ getLocalFee()

std::uint32_t ripple::LoadFeeTrack::getLocalFee ( ) const

Definition at line 75 of file LoadFeeTrack.h.

◆ getClusterFee()

std::uint32_t ripple::LoadFeeTrack::getClusterFee ( ) const

Definition at line 82 of file LoadFeeTrack.h.

◆ getLoadBase()

std::uint32_t ripple::LoadFeeTrack::getLoadBase ( ) const

Definition at line 89 of file LoadFeeTrack.h.

◆ getLoadFactor()

std::uint32_t ripple::LoadFeeTrack::getLoadFactor ( ) const

Definition at line 95 of file LoadFeeTrack.h.

◆ getScalingFactors()

std::pair<std::uint32_t, std::uint32_t> ripple::LoadFeeTrack::getScalingFactors ( ) const

Definition at line 103 of file LoadFeeTrack.h.

◆ setClusterFee()

void ripple::LoadFeeTrack::setClusterFee ( std::uint32_t  fee)

Definition at line 113 of file LoadFeeTrack.h.

◆ raiseLocalFee()

bool ripple::LoadFeeTrack::raiseLocalFee ( )

Definition at line 37 of file LoadFeeTrack.cpp.

◆ lowerLocalFee()

bool ripple::LoadFeeTrack::lowerLocalFee ( )

Definition at line 65 of file LoadFeeTrack.cpp.

◆ isLoadedLocal()

bool ripple::LoadFeeTrack::isLoadedLocal ( ) const

Definition at line 126 of file LoadFeeTrack.h.

◆ isLoadedCluster()

bool ripple::LoadFeeTrack::isLoadedCluster ( ) const

Definition at line 133 of file LoadFeeTrack.h.

Member Data Documentation

◆ lftNormalFee

constexpr std::uint32_t ripple::LoadFeeTrack::lftNormalFee
staticconstexprprivate
Initial value:
=
256

Definition at line 141 of file LoadFeeTrack.h.

◆ lftFeeIncFraction

constexpr std::uint32_t ripple::LoadFeeTrack::lftFeeIncFraction
staticconstexprprivate
Initial value:
=
4

Definition at line 143 of file LoadFeeTrack.h.

◆ lftFeeDecFraction

constexpr std::uint32_t ripple::LoadFeeTrack::lftFeeDecFraction
staticconstexprprivate
Initial value:
=
4

Definition at line 145 of file LoadFeeTrack.h.

◆ lftFeeMax

constexpr std::uint32_t ripple::LoadFeeTrack::lftFeeMax = lftNormalFee * 1000000
staticconstexprprivate

Definition at line 147 of file LoadFeeTrack.h.

◆ j_

const beast::Journal ripple::LoadFeeTrack::j_
private

Definition at line 149 of file LoadFeeTrack.h.

◆ lock_

std::mutex ripple::LoadFeeTrack::lock_
mutableprivate

Definition at line 150 of file LoadFeeTrack.h.

◆ localTxnLoadFee_

std::uint32_t ripple::LoadFeeTrack::localTxnLoadFee_
private

Definition at line 152 of file LoadFeeTrack.h.

◆ remoteTxnLoadFee_

std::uint32_t ripple::LoadFeeTrack::remoteTxnLoadFee_
private

Definition at line 153 of file LoadFeeTrack.h.

◆ clusterTxnLoadFee_

std::uint32_t ripple::LoadFeeTrack::clusterTxnLoadFee_
private

Definition at line 155 of file LoadFeeTrack.h.

◆ raiseCount_

std::uint32_t ripple::LoadFeeTrack::raiseCount_
private

Definition at line 156 of file LoadFeeTrack.h.