Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream
return;
}

bool isLocal = addr.IsRFC1918();
bool isLocal = addr.IsRFC1918() || addr.IsLocal();
std::string vchPubKey(pubkey.begin(), pubkey.end());
std::string vchPubKey2(pubkey2.begin(), pubkey2.end());

Expand Down Expand Up @@ -109,14 +109,16 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream
mn.UpdateLastSeen();

if(mn.now < sigTime){ //take the newest entry
LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
mn.pubkey2 = pubkey2;
mn.now = sigTime;
mn.sig = vchSig;
mn.protocolVersion = protocolVersion;
mn.addr = addr;

RelayDarkSendElectionEntry(vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion);
if(!isLocal){ // Never push dsee with local addresses
LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
mn.pubkey2 = pubkey2;
mn.now = sigTime;
mn.sig = vchSig;
mn.protocolVersion = protocolVersion;
mn.addr = addr;

RelayDarkSendElectionEntry(vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion);
}
}
}

Expand Down