V0.11.2.x update comments
This commit is contained in:
parent
98fe439af4
commit
c8fe5a9cf7
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
/** Object for who's going to get paid on which blocks */
|
/** Object for who's going to get paid on which blocks */
|
||||||
CMasternodePayments masternodePayments;
|
CMasternodePayments masternodePayments;
|
||||||
// keep track of masternode votes I've seen
|
// keep track of Masternode votes I've seen
|
||||||
map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
|
map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
|
||||||
// keep track of the scanning errors I've seen
|
// keep track of the scanning errors I've seen
|
||||||
map<uint256, int> mapSeenMasternodeScanningErrors;
|
map<uint256, int> mapSeenMasternodeScanningErrors;
|
||||||
@ -24,7 +24,7 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
|
|||||||
if(IsInitialBlockDownload()) return;
|
if(IsInitialBlockDownload()) return;
|
||||||
|
|
||||||
if (strCommand == "mnget") { //Masternode Payments Request Sync
|
if (strCommand == "mnget") { //Masternode Payments Request Sync
|
||||||
if(fLiteMode) return; //disable all darksend/masternode related functionality
|
if(fLiteMode) return; //disable all Darksend/Masternode related functionality
|
||||||
|
|
||||||
if(pfrom->HasFulfilledRequest("mnget")) {
|
if(pfrom->HasFulfilledRequest("mnget")) {
|
||||||
LogPrintf("mnget - peer already asked me for the list\n");
|
LogPrintf("mnget - peer already asked me for the list\n");
|
||||||
@ -34,7 +34,7 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
|
|||||||
|
|
||||||
pfrom->FulfilledRequest("mnget");
|
pfrom->FulfilledRequest("mnget");
|
||||||
masternodePayments.Sync(pfrom);
|
masternodePayments.Sync(pfrom);
|
||||||
LogPrintf("mnget - Sent masternode winners to %s\n", pfrom->addr.ToString().c_str());
|
LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
|
||||||
}
|
}
|
||||||
else if (strCommand == "mnw") { //Masternode Payments Declare Winner
|
else if (strCommand == "mnw") { //Masternode Payments Declare Winner
|
||||||
//this is required in litemode
|
//this is required in litemode
|
||||||
@ -185,7 +185,7 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Deterministically calculate a given "score" for a masternode depending on how close it's hash is to
|
// Deterministically calculate a given "score" for a Masternode depending on how close it's hash is to
|
||||||
// the proof of work for that block. The further away they are the better, the furthest will win the election
|
// the proof of work for that block. The further away they are the better, the furthest will win the election
|
||||||
// and get paid this block
|
// and get paid this block
|
||||||
//
|
//
|
||||||
@ -263,7 +263,7 @@ bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner)
|
|||||||
|
|
||||||
if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
|
if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
|
||||||
{
|
{
|
||||||
LogPrintf("CMasternodePayments::Sign - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage.c_str());
|
LogPrintf("CMasternodePayments::Sign - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ void CMasternodePayments::CleanPaymentList()
|
|||||||
vector<CMasternodePaymentWinner>::iterator it;
|
vector<CMasternodePaymentWinner>::iterator it;
|
||||||
for(it=vWinning.begin();it<vWinning.end();it++){
|
for(it=vWinning.begin();it<vWinning.end();it++){
|
||||||
if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
|
if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
|
||||||
if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old masternode payment - block %d\n", (*it).nBlockHeight);
|
if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", (*it).nBlockHeight);
|
||||||
vWinning.erase(it);
|
vWinning.erase(it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -459,7 +459,7 @@ bool CMasternodePayments::SetPrivKey(std::string strPrivKey)
|
|||||||
Sign(winner);
|
Sign(winner);
|
||||||
|
|
||||||
if(CheckSignature(winner)){
|
if(CheckSignature(winner)){
|
||||||
LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as masternode payments master\n");
|
LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as Masternode payments master\n");
|
||||||
enabled = true;
|
enabled = true;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user