mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Inject Config:
* Use dependency injections instead * Remove deprecated fee interfaces
This commit is contained in:
committed by
Vinnie Falco
parent
c7b3153958
commit
fa796a2eb5
@@ -159,18 +159,11 @@ public:
|
||||
*/
|
||||
beast::File getModuleDatabasePath () const;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
bool doImport = false;
|
||||
|
||||
bool doImport;
|
||||
bool QUIET = false;
|
||||
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
public:
|
||||
// Configuration parameters
|
||||
bool QUIET;
|
||||
|
||||
bool ELB_SUPPORT; // Support Amazon ELB
|
||||
bool ELB_SUPPORT = false;
|
||||
|
||||
std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet.
|
||||
std::string VALIDATORS_URI; // URI of validators.txt.
|
||||
@@ -188,14 +181,14 @@ public:
|
||||
REPLAY,
|
||||
NETWORK
|
||||
};
|
||||
StartUpType START_UP;
|
||||
StartUpType START_UP = NORMAL;
|
||||
|
||||
|
||||
|
||||
std::string START_LEDGER;
|
||||
|
||||
// Network parameters
|
||||
int TRANSACTION_FEE_BASE; // The number of fee units a reference transaction costs
|
||||
int TRANSACTION_FEE_BASE = 10; // The number of fee units a reference transaction costs
|
||||
|
||||
/** Operate in stand-alone mode.
|
||||
|
||||
@@ -206,26 +199,26 @@ public:
|
||||
- If no ledger is loaded, the default ledger with the root
|
||||
account is created.
|
||||
*/
|
||||
bool RUN_STANDALONE;
|
||||
bool RUN_STANDALONE = false;
|
||||
|
||||
// Note: The following parameters do not relate to the UNL or trust at all
|
||||
std::size_t NETWORK_QUORUM; // Minimum number of nodes to consider the network present
|
||||
int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative
|
||||
std::size_t NETWORK_QUORUM = 0; // Minimum number of nodes to consider the network present
|
||||
int VALIDATION_QUORUM = 1; // Minimum validations to consider ledger authoritative
|
||||
|
||||
// Peer networking parameters
|
||||
bool PEER_PRIVATE; // True to ask peers not to relay current IP.
|
||||
unsigned int PEERS_MAX;
|
||||
bool PEER_PRIVATE = false; // True to ask peers not to relay current IP.
|
||||
unsigned int PEERS_MAX = 0;
|
||||
|
||||
int WEBSOCKET_PING_FREQ;
|
||||
int WEBSOCKET_PING_FREQ = 5 * 60;
|
||||
|
||||
// RPC parameters
|
||||
Json::Value RPC_STARTUP;
|
||||
|
||||
// Path searching
|
||||
int PATH_SEARCH_OLD;
|
||||
int PATH_SEARCH;
|
||||
int PATH_SEARCH_FAST;
|
||||
int PATH_SEARCH_MAX;
|
||||
int PATH_SEARCH_OLD = 7;
|
||||
int PATH_SEARCH = 7;
|
||||
int PATH_SEARCH_FAST = 2;
|
||||
int PATH_SEARCH_MAX = 10;
|
||||
|
||||
// Validation
|
||||
RippleAddress VALIDATION_SEED;
|
||||
@@ -238,22 +231,17 @@ public:
|
||||
RippleAddress NODE_PUB;
|
||||
RippleAddress NODE_PRIV;
|
||||
|
||||
// Fee schedule (All below values are in fee units)
|
||||
std::uint64_t FEE_DEFAULT; // Default fee.
|
||||
std::uint64_t FEE_ACCOUNT_RESERVE; // Amount of units not allowed to send.
|
||||
std::uint64_t FEE_OWNER_RESERVE; // Amount of units not allowed to send per owner entry.
|
||||
std::uint64_t FEE_OFFER; // Rate per day.
|
||||
int FEE_CONTRACT_OPERATION; // fee for each contract operation
|
||||
std::uint64_t FEE_DEFAULT = 10;
|
||||
std::uint64_t FEE_ACCOUNT_RESERVE = 200*SYSTEM_CURRENCY_PARTS;
|
||||
std::uint64_t FEE_OWNER_RESERVE = 50*SYSTEM_CURRENCY_PARTS;
|
||||
std::uint64_t FEE_OFFER = 10;
|
||||
|
||||
// Node storage configuration
|
||||
std::uint32_t LEDGER_HISTORY;
|
||||
std::uint32_t FETCH_DEPTH;
|
||||
int NODE_SIZE;
|
||||
std::uint32_t LEDGER_HISTORY = 256;
|
||||
std::uint32_t FETCH_DEPTH = 1000000000;
|
||||
int NODE_SIZE = 0;
|
||||
|
||||
// Client behavior
|
||||
int ACCOUNT_PROBE_MAX; // How far to scan for accounts.
|
||||
|
||||
bool SSL_VERIFY;
|
||||
bool SSL_VERIFY = true;
|
||||
std::string SSL_VERIFY_FILE;
|
||||
std::string SSL_VERIFY_DIR;
|
||||
|
||||
@@ -264,7 +252,7 @@ public:
|
||||
std::unordered_set<uint256, beast::uhash<>> features;
|
||||
|
||||
public:
|
||||
Config ();
|
||||
Config() = default;
|
||||
|
||||
int getSize (SizedItemName) const;
|
||||
void setup (std::string const& strConf, bool bQuiet);
|
||||
@@ -277,9 +265,6 @@ public:
|
||||
void loadFromString (std::string const& fileContents);
|
||||
};
|
||||
|
||||
// DEPRECATED
|
||||
extern Config& getConfig();
|
||||
|
||||
} // ripple
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user