mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Ledger quorum configuration.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#define SECTION_PEER_SCAN_INTERVAL_MIN "peer_scan_interval_min"
|
||||
#define SECTION_PEER_START_MAX "peer_start_max"
|
||||
#define SECTION_PEER_CONNECT_LOW_WATER "peer_connect_low_water"
|
||||
#define SECTION_NETWORK_QUORUM "network_quorum"
|
||||
#define SECTION_BELIEF_QUORUM "belief_quorum"
|
||||
|
||||
Config theConfig;
|
||||
|
||||
@@ -46,6 +48,9 @@ Config::Config()
|
||||
PEER_CONNECT_LOW_WATER = DEFAULT_PEER_CONNECT_LOW_WATER;
|
||||
|
||||
TRANSACTION_FEE_BASE = 1000;
|
||||
|
||||
NETWORK_QUORUM = 0;
|
||||
BELIEF_QUORUM = 1;
|
||||
}
|
||||
|
||||
void Config::load()
|
||||
@@ -92,6 +97,11 @@ void Config::load()
|
||||
PEER_START_MAX = MIN(1, boost::lexical_cast<int>(strTemp));
|
||||
(void) sectionSingleB(secConfig, SECTION_PEER_CONNECT_LOW_WATER, strTemp);
|
||||
PEER_CONNECT_LOW_WATER = MAX(1, boost::lexical_cast<int>(strTemp));
|
||||
|
||||
(void) sectionSingleB(secConfig, SECTION_NETWORK_QUORUM, strTemp);
|
||||
NETWORK_QUORUM = MIN(0, boost::lexical_cast<int>(strTemp));
|
||||
(void) sectionSingleB(secConfig, SECTION_BELIEF_QUORUM, strTemp);
|
||||
BELIEF_QUORUM = MIN(0, boost::lexical_cast<int>(strTemp));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,9 @@ public:
|
||||
int LEDGER_SECONDS;
|
||||
int LEDGER_PROPOSAL_DELAY_SECONDS;
|
||||
int LEDGER_AVALANCHE_SECONDS;
|
||||
int BELIEF_QUORUM;
|
||||
float BELIEF_PERCENT;
|
||||
|
||||
int NETWORK_QUORUM; // Minimum number of nodes to consider the network present
|
||||
int BELIEF_QUORUM; // Percent agreement needed to sync ledger w/o validations
|
||||
|
||||
// node networking parameters
|
||||
std::string PEER_IP;
|
||||
|
||||
Reference in New Issue
Block a user