mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -52,10 +52,10 @@
|
||||
#
|
||||
# [ips]:
|
||||
# Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
|
||||
# List of ips where the Ripple protocol is avialable.
|
||||
# One ipv4 or ipv6 address per line.
|
||||
# A port may optionally be specified after adding a space to the address.
|
||||
# By convention, if known, IPs are listed in from most to least trusted.
|
||||
# List of ips where the Ripple protocol is avialable. Domain names are not
|
||||
# allowed. One ipv4 or ipv6 address per line. A port may optionally be
|
||||
# specified after adding a space to the address. By convention, if known,
|
||||
# IPs are listed in from most to least trusted.
|
||||
#
|
||||
# Examples:
|
||||
# 192.168.0.1
|
||||
@@ -102,7 +102,7 @@
|
||||
#
|
||||
# [websocket_ssl]:
|
||||
# 0 or 1.
|
||||
# Enable websocket SSL
|
||||
# Enable websocket SSL.
|
||||
#
|
||||
# [websocket_ssl_key]:
|
||||
# Specify the filename holding the SSL key in PEM format.
|
||||
@@ -128,7 +128,11 @@
|
||||
# past ledgers to acquire on server startup and the minimum to maintain while
|
||||
# running. Servers that don't need to serve clients can set this to "none".
|
||||
# Servers that want complete history can set this to "full".
|
||||
# The default is 256 ledgers
|
||||
# The default is 256 ledgers.
|
||||
#
|
||||
# [database_path]:
|
||||
# Full path of database directory.
|
||||
#
|
||||
|
||||
[peer_ip]
|
||||
0.0.0.0
|
||||
@@ -163,7 +167,7 @@ pool.ntp.org
|
||||
[validation_seed]
|
||||
shh1D4oj5czH3PUEjYES8c7Bay3tE
|
||||
|
||||
[unl_default]
|
||||
[validators_file]
|
||||
validators.txt
|
||||
|
||||
[ips]
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#define SECTION_ACCOUNT_PROBE_MAX "account_probe_max"
|
||||
#define SECTION_DATABASE_PATH "database_path"
|
||||
#define SECTION_DEBUG_LOGFILE "debug_logfile"
|
||||
#define SECTION_FEE_DEFAULT "fee_default"
|
||||
#define SECTION_FEE_NICKNAME_CREATE "fee_nickname_create"
|
||||
@@ -142,17 +143,17 @@ void Config::setup(const std::string& strConf, bool bTestNet, bool bQuiet)
|
||||
}
|
||||
}
|
||||
|
||||
boost::filesystem::create_directories(DATA_DIR, ec);
|
||||
|
||||
if (ec)
|
||||
throw std::runtime_error(str(boost::format("Can not create %s") % DATA_DIR));
|
||||
// Update default values
|
||||
load();
|
||||
|
||||
// std::cerr << "CONFIG FILE: " << CONFIG_FILE << std::endl;
|
||||
// std::cerr << "CONFIG DIR: " << CONFIG_DIR << std::endl;
|
||||
// std::cerr << "DATA DIR: " << DATA_DIR << std::endl;
|
||||
|
||||
// Update default values
|
||||
load();
|
||||
boost::filesystem::create_directories(DATA_DIR, ec);
|
||||
|
||||
if (ec)
|
||||
throw std::runtime_error(str(boost::format("Can not create %s") % DATA_DIR));
|
||||
}
|
||||
|
||||
Config::Config()
|
||||
@@ -259,6 +260,9 @@ void Config::load()
|
||||
SNTP_SERVERS = *smtTmp;
|
||||
}
|
||||
|
||||
if (sectionSingleB(secConfig, SECTION_DATABASE_PATH, DATABASE_PATH))
|
||||
DATA_DIR = DATABASE_PATH;
|
||||
|
||||
(void) sectionSingleB(secConfig, SECTION_VALIDATORS_SITE, VALIDATORS_SITE);
|
||||
|
||||
(void) sectionSingleB(secConfig, SECTION_PEER_IP, PEER_IP);
|
||||
|
||||
@@ -65,6 +65,9 @@ public:
|
||||
enum StartUpType { FRESH, NORMAL, LOAD, NETWORK };
|
||||
StartUpType START_UP;
|
||||
|
||||
// Database
|
||||
std::string DATABASE_PATH;
|
||||
|
||||
// Network parameters
|
||||
int NETWORK_START_TIME; // The Unix time we start ledger 0.
|
||||
int TRANSACTION_FEE_BASE; // The number of fee units a reference transaction costs
|
||||
|
||||
Reference in New Issue
Block a user