Removed donation flag
This commit is contained in:
parent
8e5d3bc1f7
commit
49214d0232
@ -109,24 +109,6 @@ void CActiveMasternode::ManageStatus()
|
||||
CScript donationAddress = CScript();
|
||||
int donationPercentage = 0;
|
||||
|
||||
if(nDonate == 1){
|
||||
std::string strDonationAddress = "";
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
strDonationAddress = "7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh";
|
||||
} else {
|
||||
strDonationAddress = "xwe6mWeZQsbbM9P2LQ5t5cWArHtCLAuV4N";
|
||||
}
|
||||
|
||||
CBitcoinAddress address;
|
||||
if(!address.SetString(strDonationAddress))
|
||||
{
|
||||
LogPrintf("CActiveMasternode::ManageStatus() - Invalid Donation Address\n");
|
||||
return;
|
||||
}
|
||||
donationAddress.SetDestination(address.Get());
|
||||
donationPercentage = 5; //5%
|
||||
}
|
||||
|
||||
if(!Register(vin, service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, donationAddress, donationPercentage, errorMessage)) {
|
||||
LogPrintf("CActiveMasternode::ManageStatus() - Error on Register: %s\n", errorMessage.c_str());
|
||||
}
|
||||
|
@ -1148,13 +1148,6 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
|
||||
// ********************************************************* Step 10: setup DarkSend
|
||||
|
||||
std::string strDonate = GetArg("-donate", "");
|
||||
if(strDonate != ""){
|
||||
if(strDonate == "yes" || strDonate == "true") nDonate = 1;
|
||||
else if(strDonate == "no" || strDonate == "false") nDonate = -1;
|
||||
else return InitError("Invalid donate mode, must be yes or no: " + strDonate);
|
||||
}
|
||||
|
||||
//string strNode = "23.23.186.131";
|
||||
//CAddress addr;
|
||||
//ConnectNode(addr, strNode.c_str(), true);
|
||||
|
@ -91,7 +91,7 @@ Value masternode(const Array& params, bool fHelp)
|
||||
|
||||
if (fHelp ||
|
||||
(strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" && strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count" && strCommand != "enforce"
|
||||
&& strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && strCommand != "outputs" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "donate"))
|
||||
&& strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && strCommand != "outputs" && strCommand != "vote-many" && strCommand != "vote"))
|
||||
throw runtime_error(
|
||||
"masternode \"command\"... ( \"passphrase\" )\n"
|
||||
"Set of commands to execute masternode related actions\n"
|
||||
@ -116,19 +116,8 @@ Value masternode(const Array& params, bool fHelp)
|
||||
" winners - Print list of masternode winners\n"
|
||||
" vote-many - Vote on a Dash initiative\n"
|
||||
" vote - Vote on a Dash initiative\n"
|
||||
" donate - Donate to support development (yes or no)\n"
|
||||
);
|
||||
|
||||
// *** string returned when no donation mode is set ****
|
||||
std::string strNoDonateModeSet = "";
|
||||
if(nDonate == 0) {
|
||||
strNoDonateModeSet += "---------- Please Support Dash Development! --------------\n\n";
|
||||
strNoDonateModeSet += "Dash now allows you to support future development by redirecting a small part (5%) of your masternode earnings ";
|
||||
strNoDonateModeSet += "to the Darkcoin Foundation, which will be used to pay developers for bringing this project to the next level. ";
|
||||
strNoDonateModeSet += "If you would like to donate, please execute \"masternode donate yes\" then start your node again. To avoid this ";
|
||||
strNoDonateModeSet += "message in the future add \"donate=yes\" or \"donate=no\" to your configuration.\n";
|
||||
}
|
||||
// ********************************************************
|
||||
|
||||
if (strCommand == "stop")
|
||||
{
|
||||
@ -291,19 +280,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
return mnodeman.size();
|
||||
}
|
||||
|
||||
if (strCommand == "donate")
|
||||
{
|
||||
|
||||
std::string strYesOrNo = params[1].get_str().c_str();
|
||||
|
||||
if(strYesOrNo != "yes" && strYesOrNo != "no") return "You can say 'yes' or 'no'";
|
||||
if(strYesOrNo == "yes") nDonate = 1;
|
||||
if(strYesOrNo == "no") nDonate = -1;
|
||||
|
||||
if(strYesOrNo == "yes") return "Thankyou for supporting the development of Dash! You may now start your masternode(s).";
|
||||
return "Successfully set donation mode to no. You may now start your masternode(s).";
|
||||
}
|
||||
|
||||
if (strCommand == "start")
|
||||
{
|
||||
if(!fMasterNode) return "you must set masternode=1 in the configuration";
|
||||
@ -324,9 +300,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
}
|
||||
}
|
||||
|
||||
//ask user to specify if they would like to support the project
|
||||
if(nDonate == 0) return strNoDonateModeSet;
|
||||
|
||||
if(activeMasternode.status != MASTERNODE_REMOTELY_ENABLED && activeMasternode.status != MASTERNODE_IS_CAPABLE){
|
||||
activeMasternode.status = MASTERNODE_NOT_PROCESSED; // TODO: consider better way
|
||||
std::string errorMessage;
|
||||
@ -371,9 +344,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
|
||||
bool found = false;
|
||||
|
||||
//ask user to specify if they would like to support the project
|
||||
if(nDonate == 0) return strNoDonateModeSet;
|
||||
|
||||
Object statusObj;
|
||||
statusObj.push_back(Pair("alias", alias));
|
||||
|
||||
@ -385,16 +355,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
std::string strDonateAddress = mne.getDonationAddress();
|
||||
std::string strDonationPercentage = mne.getDonationPercentage();
|
||||
|
||||
if(nDonate == 1){
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
strDonateAddress = "7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh";
|
||||
strDonationPercentage = "5"; //5%
|
||||
} else {
|
||||
strDonateAddress = "xwe6mWeZQsbbM9P2LQ5t5cWArHtCLAuV4N";
|
||||
strDonationPercentage = "5"; //5%
|
||||
}
|
||||
}
|
||||
|
||||
bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), strDonateAddress, strDonationPercentage, errorMessage);
|
||||
|
||||
statusObj.push_back(Pair("result", result ? "successful" : "failed"));
|
||||
@ -442,9 +402,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
|
||||
Object resultsObj;
|
||||
|
||||
//ask user to specify if they would like to support the project
|
||||
if(nDonate == 0) return strNoDonateModeSet;
|
||||
|
||||
BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
|
||||
total++;
|
||||
|
||||
@ -453,16 +410,6 @@ Value masternode(const Array& params, bool fHelp)
|
||||
std::string strDonateAddress = mne.getDonationAddress();
|
||||
std::string strDonationPercentage = mne.getDonationPercentage();
|
||||
|
||||
if(nDonate == 1){
|
||||
if(Params().NetworkID() == CChainParams::MAIN){
|
||||
strDonateAddress = "7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh";
|
||||
strDonationPercentage = "5"; //5%
|
||||
} else {
|
||||
strDonateAddress = "xwe6mWeZQsbbM9P2LQ5t5cWArHtCLAuV4N";
|
||||
strDonationPercentage = "5"; //5%
|
||||
}
|
||||
}
|
||||
|
||||
bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), strDonateAddress, strDonationPercentage, errorMessage);
|
||||
|
||||
Object statusObj;
|
||||
@ -721,7 +668,7 @@ Value masternodelist(const Array& params, bool fHelp)
|
||||
if (params.size() == 2) strFilter = params[1].get_str();
|
||||
|
||||
if (fHelp ||
|
||||
(strMode != "active" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank"
|
||||
(strMode != "active" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank"
|
||||
&& strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose"))
|
||||
{
|
||||
throw runtime_error(
|
||||
@ -846,7 +793,7 @@ Value masternodelist(const Array& params, bool fHelp)
|
||||
if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
|
||||
|
||||
std::string strOut = boost::lexical_cast<std::string>(mn.nScanningErrorCount);
|
||||
|
||||
|
||||
obj.push_back(Pair(strAddr, strOut.c_str()));
|
||||
} else if (strMode == "vin") {
|
||||
if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
|
||||
|
@ -109,8 +109,6 @@ bool fSucessfullyLoaded = false;
|
||||
bool fEnableDarksend = false;
|
||||
/** All denominations used by darksend */
|
||||
std::vector<int64_t> darkSendDenominations;
|
||||
// Donate 5% of masternode earnings to development
|
||||
int nDonate = 0;
|
||||
|
||||
map<string, string> mapArgs;
|
||||
map<string, vector<string> > mapMultiArgs;
|
||||
|
@ -107,7 +107,6 @@ extern int nMasternodeMinProtocol;
|
||||
extern int keysLoaded;
|
||||
extern bool fSucessfullyLoaded;
|
||||
extern std::vector<int64_t> darkSendDenominations;
|
||||
extern int nDonate;
|
||||
|
||||
extern std::map<std::string, std::string> mapArgs;
|
||||
extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
|
||||
|
Loading…
Reference in New Issue
Block a user