Skip to content

Commit

Permalink
Router: disable reseedChecker in all client netDbs
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Sep 20, 2023
1 parent fa24e11 commit 4e22fad
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,18 @@ void searchComplete(Hash key) {

public KademliaNetworkDatabaseFacade(RouterContext context, String dbid) {
_context = context;
_dbid = dbid;
_log = _context.logManager().getLog(getClass());
_networkID = context.router().getNetworkID();
_peerSelector = createPeerSelector();
_publishingLeaseSets = new HashMap<Hash, RepublishLeaseSetJob>(8);
_activeRequests = new HashMap<Hash, SearchJob>(8);
_reseedChecker = new ReseedChecker(context);
if (isClientDb())
_reseedChecker = null;
else
_reseedChecker = new ReseedChecker(context);
_blindCache = new BlindCache(context);
_dbid = dbid;

_localKey = null;
if (_log.shouldLog(Log.DEBUG))
_log.debug("Created KademliaNetworkDatabaseFacade for id: " + dbid);
Expand Down Expand Up @@ -214,6 +218,8 @@ public boolean isInitialized() {
/** @since 0.9 */
@Override
public ReseedChecker reseedChecker() {
if (isClientDb())
return null;
return _reseedChecker;
}

Expand Down

0 comments on commit 4e22fad

Please sign in to comment.