Deprecate masternodeaddr (#1048)
* Deprecate masternodeaddr (i.e. remove dash.conf-started remote masternode support)
This commit is contained in:
parent
ac9ed3545b
commit
2b3478387c
@ -59,14 +59,10 @@ void CActiveMasternode::ManageState()
|
||||
return;
|
||||
}
|
||||
|
||||
if(strMasterNodeAddr.empty()) {
|
||||
if(!GetLocal(service)) {
|
||||
strNotCapableReason = "Can't detect external address. Please use the masternodeaddr configuration option.";
|
||||
LogPrintf("CActiveMasternode::ManageState -- not capable: %s\n", strNotCapableReason);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
service = CService(strMasterNodeAddr);
|
||||
if(!GetLocal(service)) {
|
||||
strNotCapableReason = "Can't detect external address. Please consider using the externalip configuration option if problem persists.";
|
||||
LogPrintf("CActiveMasternode::ManageState -- not capable: %s\n", strNotCapableReason);
|
||||
return;
|
||||
}
|
||||
|
||||
int mainnetDefaultPort = Params(CBaseChainParams::MAIN).GetDefaultPort();
|
||||
|
@ -30,8 +30,6 @@ private:
|
||||
bool SendMasternodePing(std::string& strErrorRet);
|
||||
|
||||
public:
|
||||
// Initialized by init.cpp
|
||||
std::string strMasterNodeAddr;
|
||||
// Keys for the active Masternode
|
||||
CPubKey pubKeyMasternode;
|
||||
CKey keyMasternode;
|
||||
|
16
src/init.cpp
16
src/init.cpp
@ -1784,20 +1784,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
if(fMasterNode) {
|
||||
LogPrintf("MASTERNODE:\n");
|
||||
activeMasternode.strMasterNodeAddr = GetArg("-masternodeaddr", "");
|
||||
|
||||
CService service;
|
||||
if(activeMasternode.strMasterNodeAddr.empty()) {
|
||||
if(!GetLocal(service)) {
|
||||
LogPrintf("Can't detect external address. Please consider using the masternodeaddr configuration option.\n");
|
||||
}
|
||||
} else {
|
||||
service = CService(activeMasternode.strMasterNodeAddr);
|
||||
if (!service.IsValid()) {
|
||||
return InitError("Invalid masternodeaddr: " + activeMasternode.strMasterNodeAddr);
|
||||
}
|
||||
if(!GetArg("-masternodeaddr", "").empty()) {
|
||||
// Hot masternode (either local or remote) should get its address in
|
||||
// CActiveMasternode::ManageState() automatically and no longer relies on masternodeaddr.
|
||||
return InitError(_("masternodeaddr option is deprecated. Please use masternode.conf to manage your remote masterndodes."));
|
||||
}
|
||||
LogPrintf(" service: %s\n", service.ToString());
|
||||
|
||||
std::string strMasterNodePrivKey = GetArg("-masternodeprivkey", "");
|
||||
if(!strMasterNodePrivKey.empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user