do not search for known sporks by hash, search only by ID

This commit is contained in:
UdjinM6 2015-04-07 18:17:50 +03:00
parent b8ecf10af0
commit debcbb75b1

View File

@ -39,7 +39,7 @@ void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
if(chainActive.Tip() == NULL) return;
uint256 hash = spork.GetHash();
if(mapSporks.count(hash) && mapSporksActive.count(spork.nSporkID)) {
if(mapSporksActive.count(spork.nSporkID)) {
if(mapSporksActive[spork.nSporkID].nTimeSigned >= spork.nTimeSigned){
if(fDebug) LogPrintf("spork - seen %s block %d \n", hash.ToString().c_str(), chainActive.Tip()->nHeight);
return;
@ -230,4 +230,4 @@ std::string CSporkManager::GetSporkNameByID(int id)
if(id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING";
return "Unknown";
}
}