Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[sin] allow reuse ip when node is expired
Signed-off-by: crptec <crptec.fr@gmail.com>
  • Loading branch information
crptec committed May 11, 2021
1 parent 3656cb5 commit 57eb297
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sinovate/infinitynodemeta.cpp
Expand Up @@ -86,7 +86,12 @@ bool CInfinitynodeMeta::Add(CMetadata &meta)
CAddress add = CAddress(infpair.second.getService(), NODE_NETWORK);

if (m.getMetaID() != meta.getMetaID() && (m.getMetaPublicKey() == sPublicKey || addMeta.ToStringIP() == add.ToStringIP())) {
fCheckExistant = true;
std::map<COutPoint, CInfinitynode> mapInfinitynodes = infnodeman.GetFullInfinitynodeMap();
for (auto& infnodepair : mapInfinitynodes) {
if (infnodepair.second.getMetaID() == meta.getMetaID() && infnodepair.second.getExpireHeight() >= meta.getMetadataHeight()) {
fCheckExistant = true;
}
}
}
}
}
Expand Down

0 comments on commit 57eb297

Please sign in to comment.