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 )
{ {
@@ -257,7 +266,7 @@ void *chainparams_commandline(void *ptr)
if (ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH) if (ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH)
{ {
// this is only good for 60 second blocks with an averaging window of 45. for other parameters, use: // this is only good for 60 second blocks with an averaging window of 45. for other parameters, use:
// nLwmaAjustedWeight = (N+1)/2 * (0.9989^(500/nPowAveragingWindow)) * nPowTargetSpacing // nLwmaAjustedWeight = (N+1)/2 * (0.9989^(500/nPowAveragingWindow)) * nPowTargetSpacing
mainParams.consensus.nLwmaAjustedWeight = 1350; mainParams.consensus.nLwmaAjustedWeight = 1350;
mainParams.consensus.nPowAveragingWindow = 45; mainParams.consensus.nPowAveragingWindow = 45;
mainParams.consensus.powAlternate = uint256S("00000f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f"); mainParams.consensus.powAlternate = uint256S("00000f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f");
@@ -632,7 +641,7 @@ public:
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K)); BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K));
nEquihashN = N; nEquihashN = N;
nEquihashK = K; nEquihashK = K;
genesis = CreateGenesisBlock( genesis = CreateGenesisBlock(
1296688602, 1296688602,
uint256S("0x0000000000000000000000000000000000000000000000000000000000000009"), uint256S("0x0000000000000000000000000000000000000000000000000000000000000009"),

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))) {