forked from I2P_Developers/i2p.i2p
rename method
This commit is contained in:
@ -114,13 +114,13 @@ public abstract class CommSystemFacade implements Service {
|
||||
public String getOurCountry() { return null; }
|
||||
|
||||
/** @since 0.8.13 */
|
||||
public boolean isInBadCountry() { return false; }
|
||||
public boolean isInStrictCountry() { return false; }
|
||||
|
||||
/** @since 0.9.16 */
|
||||
public boolean isInBadCountry(Hash peer) { return false; }
|
||||
public boolean isInStrictCountry(Hash peer) { return false; }
|
||||
|
||||
/** @since 0.9.16 */
|
||||
public boolean isInBadCountry(RouterInfo ri) { return false; }
|
||||
public boolean isInStrictCountry(RouterInfo ri) { return false; }
|
||||
|
||||
public String getCountry(Hash peer) { return null; }
|
||||
public String getCountryName(String code) { return code; }
|
||||
|
@ -1164,7 +1164,7 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
String h = _context.getProperty(PROP_HIDDEN_HIDDEN);
|
||||
if (h != null)
|
||||
return Boolean.parseBoolean(h);
|
||||
return _context.commSystem().isInBadCountry();
|
||||
return _context.commSystem().isInStrictCountry();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -125,7 +125,7 @@ class FloodfillMonitorJob extends JobImpl {
|
||||
if (!getContext().getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP))
|
||||
return false;
|
||||
|
||||
if (getContext().commSystem().isInBadCountry())
|
||||
if (getContext().commSystem().isInStrictCountry())
|
||||
return false;
|
||||
String country = getContext().commSystem().getOurCountry();
|
||||
// anonymous proxy, satellite provider (not in bad country list)
|
||||
|
@ -253,7 +253,7 @@ class FloodfillPeerSelector extends PeerSelector {
|
||||
badff.add(entry);
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Old: " + entry);
|
||||
} else if (info != null && _context.commSystem().isInBadCountry(info)) {
|
||||
} else if (info != null && _context.commSystem().isInStrictCountry(info)) {
|
||||
badff.add(entry);
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Bad country: " + entry);
|
||||
|
@ -112,7 +112,7 @@ public class ReseedBundler {
|
||||
continue;
|
||||
if (!hasIPv4)
|
||||
continue;
|
||||
if (_context.commSystem().isInBadCountry(ri))
|
||||
if (_context.commSystem().isInStrictCountry(ri))
|
||||
continue;
|
||||
|
||||
toWrite.add(ri);
|
||||
|
@ -1391,7 +1391,7 @@ public class ProfileOrganizer {
|
||||
// don't allow them in the high-cap pool, what would the point of that be?
|
||||
if (_thresholdCapacityValue <= profile.getCapacityValue() &&
|
||||
isSelectable(peer) &&
|
||||
!_context.commSystem().isInBadCountry(peer)) {
|
||||
!_context.commSystem().isInStrictCountry(peer)) {
|
||||
_highCapacityPeers.put(peer, profile);
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("High capacity: \t" + peer);
|
||||
|
@ -436,7 +436,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
* @since 0.8.13
|
||||
*/
|
||||
@Override
|
||||
public boolean isInBadCountry() {
|
||||
public boolean isInStrictCountry() {
|
||||
String us = getOurCountry();
|
||||
return (us != null && StrictCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry");
|
||||
}
|
||||
@ -447,7 +447,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
* @since 0.9.16
|
||||
*/
|
||||
@Override
|
||||
public boolean isInBadCountry(Hash peer) {
|
||||
public boolean isInStrictCountry(Hash peer) {
|
||||
String c = getCountry(peer);
|
||||
return c != null && StrictCountries.contains(c);
|
||||
}
|
||||
@ -458,7 +458,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
* @since 0.9.16
|
||||
*/
|
||||
@Override
|
||||
public boolean isInBadCountry(RouterInfo ri) {
|
||||
public boolean isInStrictCountry(RouterInfo ri) {
|
||||
byte[] ip = getIP(ri);
|
||||
if (ip == null)
|
||||
return false;
|
||||
|
@ -483,7 +483,7 @@ public class GeoIP {
|
||||
String country = ctx.commSystem().getCountry(ourHash);
|
||||
if (country != null && !country.equals(oldCountry)) {
|
||||
ctx.router().saveConfig(PROP_IP_COUNTRY, country);
|
||||
if (ctx.commSystem().isInBadCountry() && ctx.getProperty(Router.PROP_HIDDEN_HIDDEN) == null) {
|
||||
if (ctx.commSystem().isInStrictCountry() && ctx.getProperty(Router.PROP_HIDDEN_HIDDEN) == null) {
|
||||
String name = fullName(country);
|
||||
if (name == null)
|
||||
name = country;
|
||||
|
Reference in New Issue
Block a user