Skip to content

Avoid adding invalid seeds to liquidtestnet #1447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ class CCustomParams : public CRegTestParams {
protected:
std::string default_magic_str = "5319F20E";
std::string default_signblockscript = "51";
bool use_invalid_seeds = true;
void UpdateFromArgs(const ArgsManager& args)
{
UpdateActivationParametersFromArgs(args);
Expand Down Expand Up @@ -862,7 +863,9 @@ class CCustomParams : public CRegTestParams {
std::copy(begin(magic_byte), end(magic_byte), pchMessageStart);

vSeeds.clear();
vSeeds.emplace_back("dummySeed.invalid.");
if (use_invalid_seeds) {
vSeeds.emplace_back("dummySeed.invalid.");
}
if (args.IsArgSet("-seednode")) {
const auto seednodes = args.GetArgs("-seednode");
if (seednodes.size() != 1 || seednodes[0] != "0") {
Expand Down Expand Up @@ -1044,6 +1047,7 @@ class CLiquidTestNetParams : public CCustomParams {
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nStartTime = 0;

nDefaultPort = 18891;
use_invalid_seeds = false;
vSeeds.clear();
vFixedSeeds = std::vector<uint8_t>(std::begin(pnSeed6_liquidtestnet), std::end(pnSeed6_liquidtestnet));

Expand Down