fix eligibility traces
[oweals/gnunet.git] / src / ats / test_ats_solver_request_and_add_address.c
index e9aa03e55ca95d6a4ab1e515b9818867c4fadbd8..75742320045487a1c4de2a653971393b3350abe0 100644 (file)
@@ -177,18 +177,9 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
     GNUNET_SCHEDULER_add_now (&end_badly, NULL);
     return;
   }
-  /* Request */
-  GNUNET_ATS_suggest_address (sched_ats, &p.id);
 
   /* Set up peer */
-  if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string(PEERID0, &p.id.hashPubKey))
-  {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n");
-      GNUNET_SCHEDULER_add_now (&end_badly, NULL);
-      return;
-  }
-  GNUNET_assert (0 == strcmp (PEERID0, GNUNET_i2s_full (&p.id)));
-
+  memset (&p.id, '1', sizeof (p.id));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created peer `%s'\n",
               GNUNET_i2s_full(&p.id));
 
@@ -207,6 +198,10 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
   test_hello_address.address = test_addr.addr;
   test_hello_address.address_length = test_addr.addr_len;
 
+  /* Request */
+  GNUNET_ATS_suggest_address (sched_ats, &p.id);
+
+
   /* Adding address */
   GNUNET_ATS_address_add (sched_ats, &test_hello_address, NULL, test_ats_info, test_ats_count);
 }