mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Allow masternode mode and -listen=0 in regtest mode
This commit is contained in:
parent
bb63327623
commit
38bf1a31fb
@ -1459,7 +1459,7 @@ bool AppInitParameterInteraction()
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-masternodeblsprivkey")) {
|
||||
if (!gArgs.GetBoolArg("-listen", DEFAULT_LISTEN)) {
|
||||
if (!gArgs.GetBoolArg("-listen", DEFAULT_LISTEN) && Params().NetworkIDString() != CBaseChainParams::REGTEST) {
|
||||
return InitError("Masternode must accept connections from outside, set -listen=1");
|
||||
}
|
||||
if (!gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
|
||||
|
@ -68,7 +68,7 @@ void CActiveMasternodeManager::Init(const CBlockIndex* pindex)
|
||||
if (!deterministicMNManager->IsDIP3Enforced(pindex->nHeight)) return;
|
||||
|
||||
// Check that our local network configuration is correct
|
||||
if (!fListen) {
|
||||
if (!fListen && Params().NetworkIDString() != CBaseChainParams::REGTEST) {
|
||||
// listen option is probably overwritten by something else, no good
|
||||
state = MASTERNODE_ERROR;
|
||||
strError = "Masternode must accept connections from outside. Make sure listen configuration option is not overwritten by some another parameter.";
|
||||
@ -119,7 +119,7 @@ void CActiveMasternodeManager::Init(const CBlockIndex* pindex)
|
||||
bool fConnected = ConnectSocketDirectly(activeMasternodeInfo.service, hSocket, nConnectTimeout) && IsSelectableSocket(hSocket);
|
||||
CloseSocket(hSocket);
|
||||
|
||||
if (!fConnected) {
|
||||
if (!fConnected && Params().NetworkIDString() != CBaseChainParams::REGTEST) {
|
||||
state = MASTERNODE_ERROR;
|
||||
strError = "Could not connect to " + activeMasternodeInfo.service.ToString();
|
||||
LogPrintf("CActiveMasternodeManager::Init -- ERROR: %s\n", strError);
|
||||
|
Loading…
Reference in New Issue
Block a user