Пример #1
0
 private void searchAll() {
   ECKey key;
   RegexQuery query;
   long localGen;
   while (!(forceStop || threadKilled())) {
     key = new ECKey();
     localGen = ++generated;
     if ((query = pool.matches(key, netParams)) != null) {
       addressFound(
           key, query.getNetworkParameters(netParams), generated, getGeneratedPerSecond(), query);
       if (!query.isFindUnlimited()) {
         pool.removeQuery(query);
       }
     }
     if (canBurstUpdate(localGen)) {
       burstGenerated(generated, updateAmount, getGeneratedPerSecond());
     }
   }
 }
Пример #2
0
 private void customSearch() {
   RegexQuery query = getNextQuery();
   if (query == null) return;
   ECKey key;
   long localGen;
   isSearching = true;
   while (isSearching && !threadKilled()) {
     key = new ECKey();
     localGen = ++generated;
     if (query.matches(key, netParams)) {
       addressFound(key, netParams, localGen, getGeneratedPerSecond(), query);
       pool.removeQuery(query);
       break;
     }
     if (canBurstUpdate(localGen)) {
       burstGenerated(localGen, updateAmount, getGeneratedPerSecond());
     }
   }
   if (!forceStop) {
     customSearch();
   }
 }