|
|
@ -105,16 +105,6 @@ public: |
|
|
|
if (!(services & NODE_NETWORK)) return false; |
|
|
|
if (!ip.IsRoutable()) return false; |
|
|
|
if (clientVersion && clientVersion < REQUIRE_VERSION) return false; |
|
|
|
|
|
|
|
// HUSH MOD
|
|
|
|
if ((clientSubVersion != SUBV1) && |
|
|
|
(clientSubVersion != SUBV2) && |
|
|
|
(clientSubVersion != SUBV3) && |
|
|
|
(clientSubVersion != SUBV4) && |
|
|
|
(clientSubVersion != SUBV5) && |
|
|
|
(clientSubVersion != SUBV6)) return false; |
|
|
|
// END
|
|
|
|
|
|
|
|
if (blocks && blocks < GetRequireHeight()) return false; |
|
|
|
|
|
|
|
if (total <= 3 && success * 2 >= total) return true; |
|
|
@ -130,16 +120,6 @@ public: |
|
|
|
int GetBanTime() const { |
|
|
|
if (IsGood()) return 0; |
|
|
|
if (clientVersion && clientVersion < minimunClientVersion) { return 604800; } |
|
|
|
|
|
|
|
// HUSH MOD
|
|
|
|
if ((clientSubVersion != SUBV1) && |
|
|
|
(clientSubVersion != SUBV2) && |
|
|
|
(clientSubVersion != SUBV3) && |
|
|
|
(clientSubVersion != SUBV4) && |
|
|
|
(clientSubVersion != SUBV5) && |
|
|
|
(clientSubVersion != SUBV6)) { return 604800; } |
|
|
|
// END
|
|
|
|
|
|
|
|
if (stat1M.reliability - stat1M.weight + 1.0 < 0.15 && stat1M.count > 32) { return 30*86400; } |
|
|
|
if (stat1W.reliability - stat1W.weight + 1.0 < 0.10 && stat1W.count > 16) { return 7*86400; } |
|
|
|
if (stat1D.reliability - stat1D.weight + 1.0 < 0.05 && stat1D.count > 8) { return 1*86400; } |
|
|
|