I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit bc791f91 authored by zzz's avatar zzz
Browse files

NetDB: Comment out unused FloodOnlySearchJob code

parent f938090d
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,8 @@ abstract class FloodOnlySearchJob extends FloodSearchJob { ...@@ -65,6 +65,8 @@ abstract class FloodOnlySearchJob extends FloodSearchJob {
@Override @Override
public void runJob() { public void runJob() {
throw new UnsupportedOperationException("use override");
/****
// pick some floodfill peers and send out the searches // pick some floodfill peers and send out the searches
// old // old
//List<Hash> floodfillPeers = _facade.getFloodfillPeers(); //List<Hash> floodfillPeers = _facade.getFloodfillPeers();
...@@ -105,7 +107,6 @@ abstract class FloodOnlySearchJob extends FloodSearchJob { ...@@ -105,7 +107,6 @@ abstract class FloodOnlySearchJob extends FloodSearchJob {
// so we can register a reply selector. // so we can register a reply selector.
_out = getContext().messageRegistry().registerPending(_replySelector, _onReply, _onTimeout); _out = getContext().messageRegistry().registerPending(_replySelector, _onReply, _onTimeout);
/********
// We need to randomize our ff selection, else we stay with the same ones since // We need to randomize our ff selection, else we stay with the same ones since
// getFloodfillPeers() is sorted by closest distance. Always using the same // getFloodfillPeers() is sorted by closest distance. Always using the same
// ones didn't help reliability. // ones didn't help reliability.
...@@ -140,7 +141,6 @@ abstract class FloodOnlySearchJob extends FloodSearchJob { ...@@ -140,7 +141,6 @@ abstract class FloodOnlySearchJob extends FloodSearchJob {
} else { } else {
_shouldProcessDSRM = true; _shouldProcessDSRM = true;
} }
********/
int count = 0; // keep a separate count since _lookupsRemaining could be decremented elsewhere int count = 0; // keep a separate count since _lookupsRemaining could be decremented elsewhere
for (int i = 0; _lookupsRemaining.get() < CONCURRENT_SEARCHES && i < floodfillPeers.size(); i++) { for (int i = 0; _lookupsRemaining.get() < CONCURRENT_SEARCHES && i < floodfillPeers.size(); i++) {
...@@ -172,6 +172,7 @@ abstract class FloodOnlySearchJob extends FloodSearchJob { ...@@ -172,6 +172,7 @@ abstract class FloodOnlySearchJob extends FloodSearchJob {
dlm.setMessageExpiration(getContext().clock().now() + SINGLE_SEARCH_MSG_TIME); dlm.setMessageExpiration(getContext().clock().now() + SINGLE_SEARCH_MSG_TIME);
dlm.setReplyTunnel(replyTunnel.getReceiveTunnelId(0)); dlm.setReplyTunnel(replyTunnel.getReceiveTunnelId(0));
dlm.setSearchKey(_key); dlm.setSearchKey(_key);
dlm.setSearchType(_isLease ? DatabaseLookupMessage.Type.LS : DatabaseLookupMessage.Type.RI);
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
_log.info(getJobId() + ": Floodfill search for " + _key + " to " + peer); _log.info(getJobId() + ": Floodfill search for " + _key + " to " + peer);
...@@ -186,6 +187,7 @@ abstract class FloodOnlySearchJob extends FloodSearchJob { ...@@ -186,6 +187,7 @@ abstract class FloodOnlySearchJob extends FloodSearchJob {
// no floodfill peers, fail // no floodfill peers, fail
failed(); failed();
} }
****/
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment