Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ff5934

Browse files
authored
Merge branch 'v2.4-WIP' into split-miner
2 parents c76ae43 + cbb0509 commit 8ff5934

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+297
-512
lines changed

src/activedynode.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,15 @@ void CActiveDynode::ManageStateInitial(CConnman& connman)
193193
}
194194

195195
int mainnetDefaultPort = Params(CBaseChainParams::MAIN).GetDefaultPort();
196-
if (Params().NetworkIDString() == CBaseChainParams::MAIN) {
196+
197+
if (Params().NetworkIDString() != CBaseChainParams::TESTNET && Params().NetworkIDString() != CBaseChainParams::REGTEST) {
197198
if (service.GetPort() != mainnetDefaultPort) {
198199
nState = ACTIVE_DYNODE_NOT_CAPABLE;
199200
strNotCapableReason = strprintf("Invalid port: %u - only %d is supported on mainnet.", service.GetPort(), mainnetDefaultPort);
200201
LogPrintf("CActiveDynode::ManageStateInitial -- %s: %s\n", GetStateString(), strNotCapableReason);
201202
return;
202203
}
203-
} else if (service.GetPort() == mainnetDefaultPort) {
204+
} else if (Params().NetworkIDString() != CBaseChainParams::TESTNET && Params().NetworkIDString() != CBaseChainParams::REGTEST && service.GetPort() == mainnetDefaultPort) {
204205
nState = ACTIVE_DYNODE_NOT_CAPABLE;
205206
strNotCapableReason = strprintf("Invalid port: %u - %d is only supported on mainnet.", service.GetPort(), mainnetDefaultPort);
206207
LogPrintf("CActiveDynode::ManageStateInitial -- %s: %s\n", GetStateString(), strNotCapableReason);

src/bdap/domainentrydb.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#include <univalue.h>
1212

13+
#include <boost/thread.hpp>
14+
15+
1316
CDomainEntryDB *pDomainEntryDB = NULL;
1417

1518
bool GetDomainEntry(const std::vector<unsigned char>& vchObjectPath, CDomainEntry& entry)
@@ -585,4 +588,4 @@ bool CheckDomainEntryTxInputs(const CCoinsViewCache& inputs, const CTransactionR
585588
return CheckRevokeDomainEntryTxInputs(entry, scriptOp, vvchOpParameters, errorMessage, fJustCheck);
586589

587590
return false;
588-
}
591+
}

src/chainparams.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@ class CTestNetParams : public CChainParams
309309
consensus.vDeployments[Consensus::DEPLOYMENT_ISAUTOLOCKS].nThreshold = 50; // 50% of 100
310310

311311
// The best chain should have at least this much work.
312-
consensus.nMinimumChainWork = 101; // 100 blocks
312+
consensus.nMinimumChainWork = 702; // 702 blocks
313313

314314
// By default assume that the signatures in ancestors of this block are valid.
315-
consensus.defaultAssumeValid = uint256S("0x00000ad8c5b094f7d6e63c658f8b29dfb2fbe49bb395bd41751d70e73e1f765b"); // Block 101
315+
consensus.defaultAssumeValid = uint256S("0x000004ca904b66049dbb93c7f129dec1c9e42213d42a5983a4b6ff7f4f88a912"); // Block 702
316316

317317
pchMessageStart[0] = 0x2f;
318318
pchMessageStart[1] = 0x32;
@@ -371,11 +371,12 @@ class CTestNetParams : public CChainParams
371371
boost::assign::map_list_of
372372
(0, uint256S("0x00ff3a06390940bc3fffb7948cc6d0ede8fde544a5fa9eeeafbc4ac65d21f087"))
373373
(101, uint256S("0x00000ad8c5b094f7d6e63c658f8b29dfb2fbe49bb395bd41751d70e73e1f765b"))
374+
(702, uint256S("0x000004ca904b66049dbb93c7f129dec1c9e42213d42a5983a4b6ff7f4f88a912"))
374375
};
375376

376377
chainTxData = ChainTxData{
377-
1541946336, // * UNIX timestamp of last known number of transactions
378-
102, // * total number of transactions between genesis and that timestamp
378+
1542024850, // * UNIX timestamp of last known number of transactions
379+
703, // * total number of transactions between genesis and that timestamp
379380
// (the tx=... number in the SetBestChain debug.log lines)
380381
0.1 // * estimated number of transactions per second after that timestamp
381382
};

src/fluid/fluiddynode.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "operations.h"
99
#include "script/script.h"
1010

11+
#include <boost/thread.hpp>
12+
1113
CFluidDynodeDB* pFluidDynodeDB = NULL;
1214

1315
bool GetFluidDynodeData(const CScript& scriptPubKey, CFluidDynode& entry)
@@ -195,4 +197,4 @@ bool CheckFluidDynodeDB()
195197
return false;
196198

197199
return true;
198-
}
200+
}

src/fluid/fluidmining.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "operations.h"
99
#include "script/script.h"
1010

11+
#include <boost/thread.hpp>
12+
1113
CFluidMiningDB* pFluidMiningDB = NULL;
1214

1315
bool GetFluidMiningData(const CScript& scriptPubKey, CFluidMining& entry)
@@ -195,4 +197,4 @@ bool CheckFluidMiningDB()
195197
return false;
196198

197199
return true;
198-
}
200+
}

src/miner/internal/miners-controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ void MinersController::NotifyNode(const CNode* node)
7070

7171
void MinersController::NotifyBlock(const CBlockIndex* index_new, const CBlockIndex* index_fork, bool initial_download)
7272
{
73-
_downloaded = initial_download || _downloaded;
7473
// Compare with current tip (checks for unexpected behaviour or old block)
7574
if (index_new != chainActive.Tip())
7675
return;
7776
// Create new block template for miners
7877
_last_sync_time = GetTime();
7978
_last_txn_time = mempool.GetTransactionsUpdated();
79+
_downloaded = initial_download || _downloaded;
8080
_ctx->RecreateBlock();
8181
// start miners
8282
if (can_start()) {

src/miner/internal/thread-group.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ template <class T, class Context>
1717
class ThreadGroup
1818
{
1919
public:
20-
ThreadGroup(Context ctx);
20+
explicit ThreadGroup(Context ctx);
2121

2222
// Starts set amount of target threads
2323
void Start() { SyncGroupTarget(); };

0 commit comments

Comments
 (0)