Removed unimplemented commands / mnquorum / mnscanerror

- Scanning errors should be implemented via sentinel
This commit is contained in:
Evan Duffield 2016-05-24 12:20:10 -07:00
parent 49ad98d1f3
commit ac913c0258
3 changed files with 44 additions and 11 deletions

View File

@ -213,6 +213,7 @@ void CMasternodeSync::Process()
int nMnCount = mnodeman.CountEnabled(); int nMnCount = mnodeman.CountEnabled();
// RESET SYNCING INCASE OF FAILURE // RESET SYNCING INCASE OF FAILURE
{ {
if(IsSynced()) { if(IsSynced()) {
/* /*
@ -286,7 +287,8 @@ void CMasternodeSync::Process()
if (pnode->nVersion >= mnpayments.GetMinMasternodePaymentsProto()) { if (pnode->nVersion >= mnpayments.GetMinMasternodePaymentsProto()) {
// MODE : MASTERNODE_SYNC_LIST // SYNC MASTERNODE LIST FROM OTHER CONNECTED CLIENTS
if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) { if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
// shall we move onto the next asset? // shall we move onto the next asset?
@ -315,7 +317,8 @@ void CMasternodeSync::Process()
return; //this will cause each peer to get one request each six seconds for the various assets we need return; //this will cause each peer to get one request each six seconds for the various assets we need
} }
// MODE : MASTERNODE_SYNC_MNW // SYNC MASTERNODE WINNERS FROM OTHER CONNECTED CLIENTS
if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) { if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
// Shall we move onto the next asset? // Shall we move onto the next asset?
@ -350,8 +353,46 @@ void CMasternodeSync::Process()
return; //this will cause each peer to get one request each six seconds for the various assets we need return; //this will cause each peer to get one request each six seconds for the various assets we need
} }
} }
// if (pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) {
// // MODE : MASTERNODE_SYNC_BUDGET
// if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
// // shall we move onto the next asset
// if(countBudgetItemProp > 0 && countBudgetItemFin)
// {
// if(governance.CountProposalInventoryItems() >= (sumBudgetItemProp / countBudgetItemProp)*0.9)
// {
// if(governance.CountFinalizedInventoryItems() >= (sumBudgetItemFin / countBudgetItemFin)*0.9)
// {
// GetNextAsset();
// return;
// }
// }
// }
// //we'll start rejecting votes if we accidentally get set as synced too soon, this allows plenty of time
// if(lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT){
// GetNextAsset();
// //try to activate our masternode if possible
// activeMasternode.ManageStatus();
// return;
// }
// // requesting is the last thing we do, incase we needed to move to the next asset and we've requested from each peer already
// if(pnode->HasFulfilledRequest("busync")) continue;
// pnode->FulfilledRequest("busync");
// uint256 n = uint256();
// pnode->PushMessage(NetMsgType::MNBUDGETVOTESYNC, n); //sync masternode votes
// RequestedMasternodeAttempt++;
// return; //this will cause each peer to get one request each six seconds for the various assets we need
// }
// }
} }
} }

View File

@ -42,13 +42,11 @@ const char *SPORK="spork";
const char *GETSPORKS="getsporks"; const char *GETSPORKS="getsporks";
const char *MNWINNER="mnw"; const char *MNWINNER="mnw";
const char *MNWINNERSSYNC="mnget"; const char *MNWINNERSSYNC="mnget";
const char *MNSCANERROR="mn scan error"; // TODO ???
const char *MNGOVERNANCEVOTESYNC="mnvs"; const char *MNGOVERNANCEVOTESYNC="mnvs";
const char *MNGOVERNANCEVOTE="mvote"; const char *MNGOVERNANCEVOTE="mvote";
const char *MNGOVERNANCEPROPOSAL="mprop"; const char *MNGOVERNANCEPROPOSAL="mprop";
const char *MNGOVERNANCEFINAL="fbs"; const char *MNGOVERNANCEFINAL="fbs";
const char *MNGOVERNANCEFINALVOTE="fbvote"; const char *MNGOVERNANCEFINALVOTE="fbvote";
const char *MNQUORUM="mn quorum"; // TODO ???
const char *MNANNOUNCE="mnb"; const char *MNANNOUNCE="mnb";
const char *MNPING="mnp"; const char *MNPING="mnp";
const char *DSACCEPT="dsa"; const char *DSACCEPT="dsa";
@ -74,12 +72,10 @@ static const char* ppszTypeName[] =
NetMsgType::IXLOCKVOTE, NetMsgType::IXLOCKVOTE,
NetMsgType::SPORK, NetMsgType::SPORK,
NetMsgType::MNWINNER, NetMsgType::MNWINNER,
NetMsgType::MNSCANERROR,
NetMsgType::MNGOVERNANCEVOTE, NetMsgType::MNGOVERNANCEVOTE,
NetMsgType::MNGOVERNANCEPROPOSAL, NetMsgType::MNGOVERNANCEPROPOSAL,
NetMsgType::MNGOVERNANCEFINAL, NetMsgType::MNGOVERNANCEFINAL,
NetMsgType::MNGOVERNANCEFINALVOTE, NetMsgType::MNGOVERNANCEFINALVOTE,
NetMsgType::MNQUORUM,
NetMsgType::MNANNOUNCE, NetMsgType::MNANNOUNCE,
NetMsgType::MNPING, NetMsgType::MNPING,
NetMsgType::DSTX NetMsgType::DSTX
@ -118,13 +114,11 @@ const static std::string allNetMessageTypes[] = {
NetMsgType::GETSPORKS, NetMsgType::GETSPORKS,
NetMsgType::MNWINNER, NetMsgType::MNWINNER,
NetMsgType::MNWINNERSSYNC, NetMsgType::MNWINNERSSYNC,
NetMsgType::MNSCANERROR,
NetMsgType::MNGOVERNANCEVOTESYNC, NetMsgType::MNGOVERNANCEVOTESYNC,
NetMsgType::MNGOVERNANCEVOTE, NetMsgType::MNGOVERNANCEVOTE,
NetMsgType::MNGOVERNANCEPROPOSAL, NetMsgType::MNGOVERNANCEPROPOSAL,
NetMsgType::MNGOVERNANCEFINAL, NetMsgType::MNGOVERNANCEFINAL,
NetMsgType::MNGOVERNANCEFINALVOTE, NetMsgType::MNGOVERNANCEFINALVOTE,
NetMsgType::MNQUORUM,
NetMsgType::MNANNOUNCE, NetMsgType::MNANNOUNCE,
NetMsgType::MNPING, NetMsgType::MNPING,
NetMsgType::DSACCEPT, NetMsgType::DSACCEPT,

View File

@ -227,13 +227,11 @@ extern const char *SPORK;
extern const char *GETSPORKS; extern const char *GETSPORKS;
extern const char *MNWINNER; extern const char *MNWINNER;
extern const char *MNWINNERSSYNC; extern const char *MNWINNERSSYNC;
extern const char *MNSCANERROR;
extern const char *MNGOVERNANCEVOTESYNC; extern const char *MNGOVERNANCEVOTESYNC;
extern const char *MNGOVERNANCEVOTE; extern const char *MNGOVERNANCEVOTE;
extern const char *MNGOVERNANCEPROPOSAL; extern const char *MNGOVERNANCEPROPOSAL;
extern const char *MNGOVERNANCEFINAL; extern const char *MNGOVERNANCEFINAL;
extern const char *MNGOVERNANCEFINALVOTE; extern const char *MNGOVERNANCEFINALVOTE;
extern const char *MNQUORUM;
extern const char *MNANNOUNCE; extern const char *MNANNOUNCE;
extern const char *MNPING; extern const char *MNPING;
extern const char *DSACCEPT; extern const char *DSACCEPT;