Add FixedPeers connection policy to peerfinder

This commit is contained in:
Vinnie Falco
2013-10-15 14:29:33 -07:00
parent 2cc4488d8e
commit 96328a8632
10 changed files with 113 additions and 19 deletions

View File

@@ -253,7 +253,6 @@ void Config::load ()
if (smtTmp)
{
validators = *smtTmp;
// SectionEntriesPrint(&validators, SECTION_VALIDATORS);
}
smtTmp = SectionEntries (secConfig, SECTION_CLUSTER_NODES);
@@ -261,7 +260,6 @@ void Config::load ()
if (smtTmp)
{
CLUSTER_NODES = *smtTmp;
// SectionEntriesPrint(&CLUSTER_NODES, SECTION_CLUSTER_NODES);
}
smtTmp = SectionEntries (secConfig, SECTION_IPS);
@@ -269,7 +267,13 @@ void Config::load ()
if (smtTmp)
{
IPS = *smtTmp;
// SectionEntriesPrint(&IPS, SECTION_IPS);
}
smtTmp = SectionEntries (secConfig, SECTION_IPS_FIXED);
if (smtTmp)
{
IPS_FIXED = *smtTmp;
}
smtTmp = SectionEntries (secConfig, SECTION_SNTP);

View File

@@ -344,6 +344,7 @@ public:
std::string VALIDATORS_URI; // URI of validators.txt.
std::string VALIDATORS_BASE; // Name with testnet-, if needed.
std::vector<std::string> IPS; // Peer IPs from rippled.cfg.
std::vector<std::string> IPS_FIXED; // Fixed Peer IPs from rippled.cfg.
std::vector<std::string> SNTP_SERVERS; // SNTP servers from rippled.cfg.
enum StartUpType

View File

@@ -48,6 +48,7 @@ struct ConfigSection
#define SECTION_FEE_OWNER_RESERVE "fee_owner_reserve"
#define SECTION_LEDGER_HISTORY "ledger_history"
#define SECTION_IPS "ips"
#define SECTION_IPS_FIXED "ips_fixed"
#define SECTION_NETWORK_QUORUM "network_quorum"
#define SECTION_NODE_SEED "node_seed"
#define SECTION_NODE_SIZE "node_size"