mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor LoadFeeTrack into ILoadFeeTrack, split DatabaseCon out from Application.h
Conflicts: src/cpp/ripple/Application.cpp
This commit is contained in:
35
src/cpp/ripple/ripple_ILoadFeeTrack.h
Normal file
35
src/cpp/ripple/ripple_ILoadFeeTrack.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef RIPPLE_ILOADFEETRACK_H
|
||||
#define RIPPLE_ILOADFEETRACK_H
|
||||
|
||||
/** Tracks the current fee and load schedule.
|
||||
*/
|
||||
class ILoadFeeTrack
|
||||
{
|
||||
public:
|
||||
static ILoadFeeTrack* New ();
|
||||
|
||||
virtual ~ILoadFeeTrack () { }
|
||||
|
||||
// Scale from fee units to millionths of a ripple
|
||||
virtual uint64 scaleFeeBase (uint64 fee, uint64 baseFee, uint32 referenceFeeUnits) = 0;
|
||||
|
||||
// Scale using load as well as base rate
|
||||
virtual uint64 scaleFeeLoad (uint64 fee, uint64 baseFee, uint32 referenceFeeUnits, bool bAdmin) = 0;
|
||||
|
||||
virtual uint32 getRemoteFee () = 0;
|
||||
virtual uint32 getLocalFee () = 0;
|
||||
|
||||
virtual uint32 getLoadBase () = 0;
|
||||
virtual uint32 getLoadFactor () = 0;
|
||||
|
||||
virtual Json::Value getJson (uint64 baseFee, uint32 referenceFeeUnits) = 0;
|
||||
|
||||
virtual void setRemoteFee (uint32) = 0;
|
||||
virtual bool raiseLocalFee () = 0;
|
||||
virtual bool lowerLocalFee () = 0;
|
||||
virtual bool isLoaded () = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// vim:ts=4
|
||||
Reference in New Issue
Block a user