Skip to content

Commit

Permalink
Merge pull request #497 from UdjinM6/v0.12.0.x_dsee_dseep
Browse files Browse the repository at this point in the history
V0.12.0.x fix bugs in v12 dsee/dseep
  • Loading branch information
evan82 committed Aug 9, 2015
2 parents fc5be7e + e599928 commit 7d00729
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
std::vector<unsigned char> vchMasterNodeSignature;
int64_t masterNodeSignatureTime = GetAdjustedTime();

std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(0);
std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(false);

if(!darkSendSigner.SignMessage(strMessage, retErrorMessage, vchMasterNodeSignature, keyMasternode)) {
errorMessage = "dseep sign message failed: " + retErrorMessage;
Expand All @@ -201,7 +201,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {

LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes)
pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, 0);
pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, false);

/*
* END OF "REMOVE"
Expand Down
12 changes: 10 additions & 2 deletions src/masternodeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,15 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
tx.vin.push_back(vin);
tx.vout.push_back(vout);
if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){

bool fAcceptable = false;
{
TRY_LOCK(cs_main, lockMain);
if(!lockMain) return;
fAcceptable = AcceptableInputs(mempool, state, CTransaction(tx), false, NULL);
}

if(fAcceptable){
if(fDebug) LogPrintf("dsee - Accepted OLD Masternode entry %i %i\n", count, current);

if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
Expand Down Expand Up @@ -1006,7 +1014,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
}

// fake ping
pmn->lastPing = CMasternodePing();
pmn->lastPing = CMasternodePing(vin);
pmn->Check();
if(pmn->IsEnabled()) {
TRY_LOCK(cs_vNodes, lockNodes);
Expand Down

0 comments on commit 7d00729

Please sign in to comment.