Skip to content

Commit

Permalink
Router: change logging of floodfill subdb to main subdb in FNDS. Add …
Browse files Browse the repository at this point in the history
…TODO comments to getLocalClientsBlindData and lookupClientsBySigningPublicKey.
  • Loading branch information
eyedeekay committed Sep 4, 2023
1 parent 7606731 commit 4e63234
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ public LeaseSet store(Hash key, LeaseSet leaseSet) {
}
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
if (_log.shouldLog(Log.DEBUG))
_log.debug("store " + key.toBase32() + " to floodfill");
_log.debug("store " + key.toBase32() + " to main");
return fndb.store(key, leaseSet);
}

Expand All @@ -580,7 +580,7 @@ public RouterInfo store(Hash key, RouterInfo routerInfo) {
}
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
if (_log.shouldLog(Log.DEBUG))
_log.debug("store " + key.toBase32() + " to floodfill");
_log.debug("store " + key.toBase32() + " to main");
return fndb.store(key, routerInfo);
}

Expand Down Expand Up @@ -904,8 +904,11 @@ public FloodfillNetworkDatabaseFacade localNetDB() {
public List<BlindData> getLocalClientsBlindData() {
ArrayList<BlindData> rv = new ArrayList<>();
for (String subdb : _subDBs.keySet()) {
if (subdb.startsWith("clients_"))
;
// if (subdb.startsWith("clients_"))
// TODO: see if we can access only one subDb at a time when we need
// to look up a client by SPK. We mostly need this for managing blinded
// and encrypted keys in the Keyring Config UI page. See also
// ConfigKeyringHelper
rv.addAll(_subDBs.get(subdb).getBlindData());
}
return rv;
Expand All @@ -915,8 +918,11 @@ public List<BlindData> getLocalClientsBlindData() {
public List<String> lookupClientBySigningPublicKey(SigningPublicKey spk) {
List<String> rv = new ArrayList<>();
for (String subdb : _subDBs.keySet()) {
if (subdb.startsWith("clients_"))
;
// if (subdb.startsWith("clients_"))
// TODO: see if we can access only one subDb at a time when we need
// to look up a client by SPK. We mostly need this for managing blinded
// and encrypted keys in the Keyring Config UI page. See also
// ConfigKeyringHelper
BlindData bd = _subDBs.get(subdb).getBlindData(spk);
if (bd != null) {
rv.add(subdb);
Expand Down

0 comments on commit 4e63234

Please sign in to comment.