the is better, should be able to add own seeds if this works

This commit is contained in:
blackjok3r
2018-12-06 17:54:07 +08:00
parent 0ccd6d40be
commit 7e85c39a79
2 changed files with 11 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
#include "key_io.h" #include "key_io.h"
#include "main.h" #include "main.h"
#include "crypto/equihash.h" #include "crypto/equihash.h"
#include "notaries_staked.h"
#include "util.h" #include "util.h"
#include "utilstrencodings.h" #include "utilstrencodings.h"
@@ -201,6 +202,14 @@ public:
fMineBlocksOnDemand = false; fMineBlocksOnDemand = false;
fTestnetToBeDeprecatedFieldRPC = false; fTestnetToBeDeprecatedFieldRPC = false;
// skip DNS seeds for staked chains.
if ( is_STAKED(ASSETCHAINS_SYMBOL) != 0 )
{
fprintf(stderr, "STAKED CHAIN DISABLED ALL SEEDS!\n", );
vFixedSeeds.clear();
vSeeds.clear();
}
if ( pthread_create((pthread_t *)malloc(sizeof(pthread_t)),NULL,chainparams_commandline,(void *)&consensus) != 0 ) if ( pthread_create((pthread_t *)malloc(sizeof(pthread_t)),NULL,chainparams_commandline,(void *)&consensus) != 0 )
{ {

View File

@@ -17,7 +17,6 @@
#include "scheduler.h" #include "scheduler.h"
#include "ui_interface.h" #include "ui_interface.h"
#include "crypto/common.h" #include "crypto/common.h"
#include "notaries_staked.h"
#ifdef _WIN32 #ifdef _WIN32
#include <string.h> #include <string.h>
@@ -1263,9 +1262,6 @@ void ThreadSocketHandler()
void ThreadDNSAddressSeed() void ThreadDNSAddressSeed()
{ {
// skip DNS seeds for staked chains.
if ( is_STAKED(ASSETCHAINS_SYMBOL) != 0 )
return;
// goal: only query DNS seeds if address need is acute // goal: only query DNS seeds if address need is acute
if ((addrman.size() > 0) && if ((addrman.size() > 0) &&
(!GetBoolArg("-forcednsseed", false))) { (!GetBoolArg("-forcednsseed", false))) {