forked from I2P_Developers/i2p.i2p
I2p.i2p.2.4.0 undo breaking api change
This commit is contained in:
@@ -66,6 +66,6 @@ public class ConfigAdvancedHelper extends HelperBase {
|
||||
|
||||
/** @since 0.9.21 */
|
||||
public boolean isFloodfill() {
|
||||
return _context.netDb().floodfillEnabled();
|
||||
return _context.netDbSegmentor().floodfillEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,12 @@ public class ConfigKeyringHandler extends FormHandler {
|
||||
return;
|
||||
}
|
||||
// from BlindCache
|
||||
List<String> clientBase32s = _context.netDb().lookupClientBySigningPublicKey(spk);
|
||||
List<String> clientBase32s = _context.netDbSegmentor().lookupClientBySigningPublicKey(spk);
|
||||
// TODO: This updates all of the blind data for all clients, turning the blind cache into a shared context for the owner of an encrypted leaseSet.
|
||||
// This is probably not ideal, with some social-engineering a service operator who owns an encrypted destination could associate 2 tunnels.
|
||||
// How realistic is it? Maybe not very, but I don't like it. Still, this is better than nothing.
|
||||
for (String clientBase32 : clientBase32s) {
|
||||
BlindData bdold = _context.netDb().getBlindData(spk, clientBase32);
|
||||
BlindData bdold = _context.netDbSegmentor().getBlindData(spk, clientBase32);
|
||||
if (bdold != null && d == null)
|
||||
d = bdold.getDestination();
|
||||
if (d != null && _context.clientManager().isLocal(d)) {
|
||||
@@ -164,7 +164,7 @@ public class ConfigKeyringHandler extends FormHandler {
|
||||
_log.debug("already cached: " + bdold);
|
||||
}
|
||||
try {
|
||||
_context.netDb().setBlindData(bdout, clientBase32);
|
||||
_context.netDbSegmentor().setBlindData(bdout, clientBase32);
|
||||
addFormNotice(_t("Key for {0} added to keyring", bdout.toBase32()));
|
||||
if (_mode == 6 || _mode == 7) {
|
||||
addFormNotice(_t("Send key to server operator.") + ' ' + pk.toPublic().toBase64());
|
||||
|
||||
@@ -104,7 +104,7 @@ public class ConfigKeyringHelper extends HelperBase {
|
||||
}
|
||||
// LS2
|
||||
if (!local) {
|
||||
List<BlindData> bdata = _context.netDb().getLocalClientsBlindData();
|
||||
List<BlindData> bdata = _context.netDbSegmentor().getLocalClientsBlindData();
|
||||
if (bdata.size() > 1)
|
||||
Collections.sort(bdata, new BDComparator());
|
||||
for (BlindData bd : bdata) {
|
||||
|
||||
@@ -359,7 +359,7 @@ public class NetDbHelper extends FormHandler {
|
||||
} else if (_full == 6) {
|
||||
renderer.renderStatusHTML(_out, _limit, _page, _full, null, true);
|
||||
} else if (_clientOnly && client == null) {
|
||||
for (String _client : _context.netDb().getClients()) {
|
||||
for (String _client : _context.netDbSegmentor().getClients()) {
|
||||
renderer.renderLeaseSetHTML(_out, _debug, _client, clientOnly);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -231,7 +231,7 @@ class NetDbRenderer {
|
||||
boolean notFound = true;
|
||||
Set<RouterInfo> routers = new HashSet<RouterInfo>();
|
||||
if (allClients){
|
||||
routers.addAll(_context.netDb().getRoutersKnownToClients());
|
||||
routers.addAll(_context.netDbSegmentor().getRoutersKnownToClients());
|
||||
} else {
|
||||
if (client == null)
|
||||
routers.addAll(_context.mainNetDb().getRouters());
|
||||
@@ -634,7 +634,7 @@ class NetDbRenderer {
|
||||
fmt = null;
|
||||
}
|
||||
if (clientsOnly)
|
||||
leases.addAll(_context.netDb().getLeasesKnownToClients());
|
||||
leases.addAll(_context.netDbSegmentor().getLeasesKnownToClients());
|
||||
else
|
||||
leases.addAll(netdb.getLeases());
|
||||
int medianCount = 0;
|
||||
@@ -747,7 +747,7 @@ class NetDbRenderer {
|
||||
buf.append(hostname);
|
||||
buf.append("</div>");
|
||||
} else {
|
||||
LeaseSet ls = _context.netDb().lookupLeaseSetLocally(hash);
|
||||
LeaseSet ls = _context.netDbSegmentor().lookupLeaseSetLocally(hash);
|
||||
if (ls == null) {
|
||||
// remote lookup
|
||||
LookupWaiter lw = new LookupWaiter();
|
||||
@@ -971,7 +971,7 @@ class NetDbRenderer {
|
||||
if (client != null) {
|
||||
routers.addAll(_context.clientNetDb(client).getRouters());
|
||||
} else if (clientsOnly) {
|
||||
routers.addAll(_context.netDb().getRoutersKnownToClients());
|
||||
routers.addAll(_context.netDbSegmentor().getRoutersKnownToClients());
|
||||
} else {
|
||||
routers.addAll(_context.mainNetDb().getRouters());
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ public class SummaryHelper extends HelperBase {
|
||||
else
|
||||
buf.append(DataHelper.escapeHTML(ServletUtil.truncate(name, 29))).append("…");
|
||||
buf.append("</a></b></td>\n");
|
||||
LeaseSet ls = _context.netDb().lookupLeaseSetHashIsClient(h);
|
||||
LeaseSet ls = _context.netDbSegmentor().lookupLeaseSetHashIsClient(h);
|
||||
if (ls != null && _context.tunnelManager().getOutboundClientTunnelCount(h) > 0) {
|
||||
if (!ls.isCurrent(0)) {
|
||||
// yellow light
|
||||
|
||||
@@ -493,7 +493,7 @@ public class SybilRenderer {
|
||||
Hash client = iter.next();
|
||||
if (!_context.clientManager().isLocal(client) ||
|
||||
!_context.clientManager().shouldPublishLeaseSet(client) ||
|
||||
_context.netDb().lookupLeaseSetLocally(client) == null) {
|
||||
_context.netDbSegmentor().lookupLeaseSetLocally(client) == null) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
@@ -503,7 +503,7 @@ public class SybilRenderer {
|
||||
return;
|
||||
}
|
||||
for (Hash client : destinations) {
|
||||
LeaseSet ls = _context.netDb().lookupLeaseSetLocally(client);
|
||||
LeaseSet ls = _context.netDbSegmentor().lookupLeaseSetLocally(client);
|
||||
if (ls == null)
|
||||
continue;
|
||||
Hash rkey = ls.getRoutingKey();
|
||||
|
||||
@@ -559,7 +559,7 @@ class TunnelRenderer {
|
||||
|
||||
/** @return cap char or ' ' */
|
||||
private char getCapacity(Hash peer) {
|
||||
RouterInfo info = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(peer, null);
|
||||
RouterInfo info = (RouterInfo) _context.netDbSegmentor().lookupLocallyWithoutValidation(peer, null);
|
||||
if (info != null) {
|
||||
String caps = info.getCapabilities();
|
||||
for (int i = 0; i < RouterInfo.BW_CAPABILITY_CHARS.length(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user