mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Fix ProcessVerifyBroadcast (#1423)
- check if mn rank can be calculated - fix "is in top" condition
This commit is contained in:
parent
d8fd73fcd5
commit
7f4ff495c9
@ -1293,9 +1293,16 @@ void CMasternodeMan::ProcessVerifyBroadcast(CNode* pnode, const CMasternodeVerif
|
||||
}
|
||||
|
||||
int nRank = GetMasternodeRank(mnv.vin2, mnv.nBlockHeight, MIN_POSE_PROTO_VERSION);
|
||||
if(nRank < MAX_POSE_RANK) {
|
||||
LogPrint("masternode", "MasternodeMan::ProcessVerifyBroadcast -- Mastrernode is not in top %d, current rank %d, peer=%d\n",
|
||||
(int)MAX_POSE_RANK, nRank, pnode->id);
|
||||
|
||||
if (nRank == -1) {
|
||||
LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- Can't calculate rank for masternode %s\n",
|
||||
mnv.vin2.prevout.ToStringShort());
|
||||
return;
|
||||
}
|
||||
|
||||
if(nRank > MAX_POSE_RANK) {
|
||||
LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- Mastrernode %s is not in top %d, current rank %d, peer=%d\n",
|
||||
mnv.vin2.prevout.ToStringShort(), (int)MAX_POSE_RANK, nRank, pnode->id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user