mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix validator list unit tests
This commit is contained in:
@@ -1830,7 +1830,8 @@ private:
|
||||
env.app().getOPs(),
|
||||
env.app().overlay(),
|
||||
env.app().getHashRouter());
|
||||
if (trustedKeys->quorum() == std::ceil(cfgKeys.size() * 0.8f))
|
||||
if (trustedKeys->quorum() == std::ceil(cfgKeys.size() * 0.8f) ||
|
||||
(minimumQuorum && trustedKeys->quorum() == *minimumQuorum))
|
||||
return trustedKeys;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -1982,7 +1983,7 @@ private:
|
||||
env.app().getOPs(),
|
||||
env.app().overlay(),
|
||||
env.app().getHashRouter());
|
||||
BEAST_EXPECT(validators->quorum() == 48);
|
||||
BEAST_EXPECT(validators->quorum() == 30);
|
||||
hash_set<PublicKey> nUnl;
|
||||
it = unl.begin();
|
||||
for (std::uint32_t i = 0; i < 20; ++i)
|
||||
|
||||
@@ -85,8 +85,8 @@ private:
|
||||
"http://207.261.33.37:8080/validators",
|
||||
"https://ripple.com/validators",
|
||||
"https://ripple.com:443/validators",
|
||||
"file:///etc/opt/ripple/validators.txt",
|
||||
"file:///C:/Lib/validators.txt"
|
||||
"file:///etc/opt/ripple/validators-xahau.txt",
|
||||
"file:///C:/Lib/validators-xahau.txt"
|
||||
#if !_MSC_VER
|
||||
,
|
||||
"file:///"
|
||||
|
||||
@@ -227,7 +227,7 @@ moreripplevalidators.net
|
||||
}
|
||||
|
||||
/**
|
||||
Write a validators.txt file and remove when done.
|
||||
Write a validators-xahau.txt file and remove when done.
|
||||
*/
|
||||
class ValidatorsTxtGuard : public test::detail::FileDirGuard
|
||||
{
|
||||
@@ -606,7 +606,7 @@ trustthesevalidators.gov
|
||||
{
|
||||
// load from specified [validators_file] file name
|
||||
// in config directory
|
||||
std::string const valFileName = "validators.txt";
|
||||
std::string const valFileName = "validators-xahau.txt";
|
||||
detail::ValidatorsTxtGuard const vtg(
|
||||
*this, "test_cfg", valFileName);
|
||||
detail::RippledCfgGuard const rcg(
|
||||
@@ -625,8 +625,8 @@ trustthesevalidators.gov
|
||||
// load from specified [validators_file] relative path
|
||||
// to config directory
|
||||
detail::ValidatorsTxtGuard const vtg(
|
||||
*this, "test_cfg", "validators.txt");
|
||||
auto const valFilePath = ".." / vtg.subdir() / "validators.txt";
|
||||
*this, "test_cfg", "validators-xahau.txt");
|
||||
auto const valFilePath = ".." / vtg.subdir() / "validators-xahau.txt";
|
||||
detail::RippledCfgGuard const rcg(
|
||||
*this, vtg.subdir(), "", valFilePath, false);
|
||||
BEAST_EXPECT(vtg.validatorsFileExists());
|
||||
@@ -642,7 +642,7 @@ trustthesevalidators.gov
|
||||
{
|
||||
// load from validators file in default location
|
||||
detail::ValidatorsTxtGuard const vtg(
|
||||
*this, "test_cfg", "validators.txt");
|
||||
*this, "test_cfg", "validators-xahau.txt");
|
||||
detail::RippledCfgGuard const rcg(
|
||||
*this, vtg.subdir(), "", "", false);
|
||||
BEAST_EXPECT(vtg.validatorsFileExists());
|
||||
@@ -662,7 +662,7 @@ trustthesevalidators.gov
|
||||
*this, "test_cfg", "validators.cfg");
|
||||
BEAST_EXPECT(vtg.validatorsFileExists());
|
||||
detail::ValidatorsTxtGuard const vtgDefault(
|
||||
*this, vtg.subdir(), "validators.txt", false);
|
||||
*this, vtg.subdir(), "validators-xahau.txt", false);
|
||||
BEAST_EXPECT(vtgDefault.validatorsFileExists());
|
||||
detail::RippledCfgGuard const rcg(
|
||||
*this, vtg.subdir(), "", vtg.validatorsFile(), false);
|
||||
|
||||
Reference in New Issue
Block a user