fixed hashing issues with mnw messages
This commit is contained in:
parent
fe55b12a1f
commit
d470eddc01
@ -4437,8 +4437,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
|
|
||||||
else if (strCommand == "inv")
|
else if (strCommand == "inv")
|
||||||
{
|
{
|
||||||
printf("58\n");
|
|
||||||
|
|
||||||
vector<CInv> vInv;
|
vector<CInv> vInv;
|
||||||
vRecv >> vInv;
|
vRecv >> vInv;
|
||||||
if (vInv.size() > MAX_INV_SZ)
|
if (vInv.size() > MAX_INV_SZ)
|
||||||
|
@ -337,8 +337,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
|
|
||||||
LOCK(cs_budget);
|
LOCK(cs_budget);
|
||||||
|
|
||||||
printf("%s\n", strCommand.c_str());
|
|
||||||
|
|
||||||
if (strCommand == "mnvs") { //Masternode vote sync
|
if (strCommand == "mnvs") { //Masternode vote sync
|
||||||
if(pfrom->HasFulfilledRequest("mnvs")) {
|
if(pfrom->HasFulfilledRequest("mnvs")) {
|
||||||
LogPrintf("mnvs - peer already asked me for the list\n");
|
LogPrintf("mnvs - peer already asked me for the list\n");
|
||||||
@ -435,7 +433,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!prop.IsValid()) {
|
if(!prop.IsValid()) {
|
||||||
printf("fbs - invalid prop\n");
|
LogPrintf("fbs - invalid prop\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,8 +448,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
CFinalizedBudget p(prop);
|
CFinalizedBudget p(prop);
|
||||||
budget.AddFinalizedBudget(p);
|
budget.AddFinalizedBudget(p);
|
||||||
prop.Relay();
|
prop.Relay();
|
||||||
|
|
||||||
printf("43\n");
|
|
||||||
|
|
||||||
if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
|
if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -99,7 +99,6 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
|
|||||||
if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
|
if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
|
||||||
|
|
||||||
if(masternodePayments.AddWinningMasternode(winner)){
|
if(masternodePayments.AddWinningMasternode(winner)){
|
||||||
printf("relay %s - %s \n", winner.GetHash().ToString().c_str(), winner.ToString().c_str());
|
|
||||||
winner.Relay();
|
winner.Relay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint256 GetHash(){
|
uint256 GetHash(){
|
||||||
return Hash(BEGIN(payee), END(payee));
|
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
|
||||||
|
ss << payee;
|
||||||
|
|
||||||
|
return ss.GetHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
|
bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
|
||||||
|
@ -42,26 +42,23 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
|
|||||||
if (about)
|
if (about)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("About Dash Core"));
|
setWindowTitle(tr("About Dash Core"));
|
||||||
printf("1");
|
|
||||||
|
|
||||||
/// HTML-format the license message from the core
|
/// HTML-format the license message from the core
|
||||||
QString licenseInfo = QString::fromStdString(LicenseInfo());
|
QString licenseInfo = QString::fromStdString(LicenseInfo());
|
||||||
QString licenseInfoHTML = licenseInfo;
|
QString licenseInfoHTML = licenseInfo;
|
||||||
printf("2");
|
|
||||||
// Make URLs clickable
|
// Make URLs clickable
|
||||||
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
|
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
|
||||||
uri.setMinimal(true); // use non-greedy matching
|
uri.setMinimal(true); // use non-greedy matching
|
||||||
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
|
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
|
||||||
// Replace newlines with HTML breaks
|
// Replace newlines with HTML breaks
|
||||||
licenseInfoHTML.replace("\n\n", "<br><br>");
|
licenseInfoHTML.replace("\n\n", "<br><br>");
|
||||||
printf("3");
|
|
||||||
|
|
||||||
ui->helpMessageLabel->setTextFormat(Qt::RichText);
|
ui->helpMessageLabel->setTextFormat(Qt::RichText);
|
||||||
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
text = version + "\n" + licenseInfo;
|
text = version + "\n" + licenseInfo;
|
||||||
ui->helpMessageLabel->setText(version + "<br><br>" + licenseInfoHTML);
|
ui->helpMessageLabel->setText(version + "<br><br>" + licenseInfoHTML);
|
||||||
ui->helpMessageLabel->setWordWrap(true);
|
ui->helpMessageLabel->setWordWrap(true);
|
||||||
printf("4");
|
|
||||||
} else {
|
} else {
|
||||||
setWindowTitle(tr("Command-line options"));
|
setWindowTitle(tr("Command-line options"));
|
||||||
QString header = tr("Usage:") + "\n" +
|
QString header = tr("Usage:") + "\n" +
|
||||||
|
Loading…
Reference in New Issue
Block a user