mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fixed fragmentation issue, allow masternodes to update pubkey2
This commit is contained in:
parent
326eae8621
commit
9dba880b2d
@ -9,7 +9,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 10
|
||||
#define CLIENT_VERSION_REVISION 15
|
||||
#define CLIENT_VERSION_BUILD 14
|
||||
#define CLIENT_VERSION_BUILD 15
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
#define CLIENT_VERSION_IS_RELEASE true
|
||||
|
@ -4320,6 +4320,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
if(mn.vin.prevout == vin.prevout) {
|
||||
if(!mn.UpdatedWithin(MASTERNODE_MIN_SECONDS)){
|
||||
mn.UpdateLastSeen();
|
||||
mn.pubkey2 = pubkey2;
|
||||
|
||||
if(pubkey2 == darkSendPool.pubkeyMasterNode2){
|
||||
darkSendPool.EnableHotColdMasterNode(vin, sigTime, addr);
|
||||
@ -4395,15 +4396,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
bool stop;
|
||||
vRecv >> vin >> vchSig >> sigTime >> stop;
|
||||
|
||||
if (sigTime > GetAdjustedTime() + 15 * 60) {
|
||||
if (sigTime > GetAdjustedTime() + 60 * 60) {
|
||||
LogPrintf("dseep: Signature rejected, too far into the future %s\n", vin.ToString().c_str());
|
||||
pfrom->Misbehaving(20);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sigTime <= GetAdjustedTime() - 15 * 60) {
|
||||
if (sigTime <= GetAdjustedTime() - 60 * 60) {
|
||||
LogPrintf("dseep: Signature rejected, too far into the past %s\n", vin.ToString().c_str());
|
||||
pfrom->Misbehaving(20);
|
||||
//pfrom->Misbehaving(20);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4417,7 +4418,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
std::string errorMessage = "";
|
||||
if(!darkSendSigner.VerifyMessage(mn.pubkey2, vchSig, strMessage, errorMessage)){
|
||||
LogPrintf("dseep: Got bad masternode address signature %s \n", vin.ToString().c_str());
|
||||
pfrom->Misbehaving(20);
|
||||
//pfrom->Misbehaving(20);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user