forked from I2P_Developers/i2p.i2p
Router: change logging of floodfill subdb to main subdb in FNDS. Add TODO comments to getLocalClientsBlindData and lookupClientsBySigningPublicKey.
This commit is contained in:
@@ -564,7 +564,7 @@ public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseF
|
|||||||
}
|
}
|
||||||
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
|
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("store " + key.toBase32() + " to floodfill");
|
_log.debug("store " + key.toBase32() + " to main");
|
||||||
return fndb.store(key, leaseSet);
|
return fndb.store(key, leaseSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,7 +580,7 @@ public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseF
|
|||||||
}
|
}
|
||||||
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
|
FloodfillNetworkDatabaseFacade fndb = _context.mainNetDb();
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("store " + key.toBase32() + " to floodfill");
|
_log.debug("store " + key.toBase32() + " to main");
|
||||||
return fndb.store(key, routerInfo);
|
return fndb.store(key, routerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -904,8 +904,11 @@ public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseF
|
|||||||
public List<BlindData> getLocalClientsBlindData() {
|
public List<BlindData> getLocalClientsBlindData() {
|
||||||
ArrayList<BlindData> rv = new ArrayList<>();
|
ArrayList<BlindData> rv = new ArrayList<>();
|
||||||
for (String subdb : _subDBs.keySet()) {
|
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());
|
rv.addAll(_subDBs.get(subdb).getBlindData());
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
@@ -915,8 +918,11 @@ public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseF
|
|||||||
public List<String> lookupClientBySigningPublicKey(SigningPublicKey spk) {
|
public List<String> lookupClientBySigningPublicKey(SigningPublicKey spk) {
|
||||||
List<String> rv = new ArrayList<>();
|
List<String> rv = new ArrayList<>();
|
||||||
for (String subdb : _subDBs.keySet()) {
|
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);
|
BlindData bd = _subDBs.get(subdb).getBlindData(spk);
|
||||||
if (bd != null) {
|
if (bd != null) {
|
||||||
rv.add(subdb);
|
rv.add(subdb);
|
||||||
|
Reference in New Issue
Block a user