Skip to content

Commit

Permalink
Router: Remove lookupLeaseSet\* functions from FNDS and SNDF
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Oct 29, 2023
1 parent 03fe3fc commit 5eff75b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ public void fail(Hash dbEntry) {
public Set<Hash> getAllRouters() { return new HashSet<Hash>(_routers.keySet()); }
public Set<Hash> findNearestRouters(Hash key, int maxNumRouters, Set<Hash> peersToIgnore) { return getAllRouters(); }

@Override
public LeaseSet lookupLeaseSetHashIsClient(Hash key) {
throw new UnsupportedOperationException("Unimplemented method 'lookupLeaseSetHashIsClient'");
}

@Override
public FloodfillNetworkDatabaseFacade mainNetDB() {
return _fndb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,43 +155,6 @@ public List<Hash> getFloodfillPeers() {
return peers;
}

/**
* Lookup using the client's tunnels when the client LS key is know
* but the client dbid is not.
*
* @param key The LS key for client.
* @return may be null
* @since 0.9.60
*/
@Override
public LeaseSet lookupLeaseSetHashIsClient(Hash key) {
return lookupLeaseSetLocally(key, null);
}

/**
* Lookup using the client's tunnels when the client LS key is known.
* if a DBID is not provided, the clients will all be checked, and the
* first value will be used.
*
* @return may be null
* @since 0.9.60
*/
//@Override
protected LeaseSet lookupLeaseSetLocally(Hash key, Hash dbid) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("lookupLeaseSetLocally on all subDbs: " + key.toBase32());
if (dbid == null) {
LeaseSet rv = null;
for (FloodfillNetworkDatabaseFacade subdb : getClientSubNetDBs()) {
rv = subdb.lookupLeaseSetLocally(key);
if (rv != null) {
return rv;
}
}
}
return this.getSubNetDB(dbid).lookupLeaseSetLocally(key);
}

/**
* Check if all of the known subDbs are initialized
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ public boolean useSubDbs() {
* @since 0.9.60
*/
public abstract void startup();
/**
* Lookup the leaseSet for a given key in only client dbs.
*
* @return may be null
* @since 0.9.60
*/
public abstract LeaseSet lookupLeaseSetHashIsClient(Hash key);
/**
* Get a set of all sub-netDbs.
*
Expand Down

0 comments on commit 5eff75b

Please sign in to comment.