Remove ChainParams::DefaultMinerThreads
No longer relevant after #5957. This hack existed because of another hack where the numthreads parameter, on regtest, doubled as how many blocks to generate.
This commit is contained in:
committed by
Jack Grigg
parent
da1357e6cc
commit
2854c4e366
@@ -59,7 +59,6 @@ public:
|
|||||||
pchMessageStart[3] = 0x64;
|
pchMessageStart[3] = 0x64;
|
||||||
vAlertPubKey = ParseHex("04b7ecf0baa90495ceb4e4090f6b2fd37eec1e9c85fac68a487f3ce11589692e4a317479316ee814e066638e1db54e37a10689b70286e6315b1087b6615d179264");
|
vAlertPubKey = ParseHex("04b7ecf0baa90495ceb4e4090f6b2fd37eec1e9c85fac68a487f3ce11589692e4a317479316ee814e066638e1db54e37a10689b70286e6315b1087b6615d179264");
|
||||||
nDefaultPort = 8233;
|
nDefaultPort = 8233;
|
||||||
nMinerThreads = 0;
|
|
||||||
nMaxTipAge = 24 * 60 * 60;
|
nMaxTipAge = 24 * 60 * 60;
|
||||||
nPruneAfterHeight = 100000;
|
nPruneAfterHeight = 100000;
|
||||||
const size_t N = 200, K = 9;
|
const size_t N = 200, K = 9;
|
||||||
@@ -219,7 +218,6 @@ public:
|
|||||||
pchMessageStart[3] = 0xbf;
|
pchMessageStart[3] = 0xbf;
|
||||||
vAlertPubKey = ParseHex("044e7a1553392325c871c5ace5d6ad73501c66f4c185d6b0453cf45dec5a1322e705c672ac1a27ef7cdaf588c10effdf50ed5f95f85f2f54a5f6159fca394ed0c6");
|
vAlertPubKey = ParseHex("044e7a1553392325c871c5ace5d6ad73501c66f4c185d6b0453cf45dec5a1322e705c672ac1a27ef7cdaf588c10effdf50ed5f95f85f2f54a5f6159fca394ed0c6");
|
||||||
nDefaultPort = 18233;
|
nDefaultPort = 18233;
|
||||||
nMinerThreads = 0;
|
|
||||||
nPruneAfterHeight = 1000;
|
nPruneAfterHeight = 1000;
|
||||||
|
|
||||||
//! Modify the testnet genesis block so the timestamp is valid for a later start.
|
//! Modify the testnet genesis block so the timestamp is valid for a later start.
|
||||||
@@ -308,7 +306,6 @@ public:
|
|||||||
pchMessageStart[1] = 0xe8;
|
pchMessageStart[1] = 0xe8;
|
||||||
pchMessageStart[2] = 0x3f;
|
pchMessageStart[2] = 0x3f;
|
||||||
pchMessageStart[3] = 0x5f;
|
pchMessageStart[3] = 0x5f;
|
||||||
nMinerThreads = 1;
|
|
||||||
nMaxTipAge = 24 * 60 * 60;
|
nMaxTipAge = 24 * 60 * 60;
|
||||||
const size_t N = 48, K = 5;
|
const size_t N = 48, K = 5;
|
||||||
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K));
|
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K));
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ public:
|
|||||||
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
|
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
|
||||||
int GetDefaultPort() const { return nDefaultPort; }
|
int GetDefaultPort() const { return nDefaultPort; }
|
||||||
|
|
||||||
/** Used if GenerateBitcoins is called with a negative number of threads */
|
|
||||||
int DefaultMinerThreads() const { return nMinerThreads; }
|
|
||||||
const CBlock& GenesisBlock() const { return genesis; }
|
const CBlock& GenesisBlock() const { return genesis; }
|
||||||
/** Make miner wait to have peers to avoid wasting work */
|
/** Make miner wait to have peers to avoid wasting work */
|
||||||
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
|
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
|
||||||
@@ -91,7 +89,6 @@ protected:
|
|||||||
//! Raw pub key bytes for the broadcast alert signing key.
|
//! Raw pub key bytes for the broadcast alert signing key.
|
||||||
std::vector<unsigned char> vAlertPubKey;
|
std::vector<unsigned char> vAlertPubKey;
|
||||||
int nDefaultPort = 0;
|
int nDefaultPort = 0;
|
||||||
int nMinerThreads = 0;
|
|
||||||
long nMaxTipAge = 0;
|
long nMaxTipAge = 0;
|
||||||
uint64_t nPruneAfterHeight = 0;
|
uint64_t nPruneAfterHeight = 0;
|
||||||
unsigned int nEquihashN = 0;
|
unsigned int nEquihashN = 0;
|
||||||
|
|||||||
@@ -748,13 +748,8 @@ void GenerateBitcoins(bool fGenerate, int nThreads)
|
|||||||
{
|
{
|
||||||
static boost::thread_group* minerThreads = NULL;
|
static boost::thread_group* minerThreads = NULL;
|
||||||
|
|
||||||
if (nThreads < 0) {
|
if (nThreads < 0)
|
||||||
// In regtest threads defaults to 1
|
nThreads = GetNumCores();
|
||||||
if (Params().DefaultMinerThreads())
|
|
||||||
nThreads = Params().DefaultMinerThreads();
|
|
||||||
else
|
|
||||||
nThreads = GetNumCores();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (minerThreads != NULL)
|
if (minerThreads != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user