aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-26 16:40:09 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-26 16:40:09 +0200
commit823215c974ccb1ef3cad9eb1082999cd1b910416 (patch)
tree7984816482be2a6a50786796d7c24d297a707593 /src/zonemaster
parent1b21e0b643f37675683b09b9e528721cb7df74e5 (diff)
downloadgnunet-823215c974ccb1ef3cad9eb1082999cd1b910416.tar.gz
gnunet-823215c974ccb1ef3cad9eb1082999cd1b910416.zip
misc zoneimporter fixes
Diffstat (limited to 'src/zonemaster')
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index f40f25c3f..518d5f572 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -181,6 +181,13 @@ static struct GNUNET_SCHEDULER_Task *zone_publish_task;
181static int first_zone_iteration; 181static int first_zone_iteration;
182 182
183/** 183/**
184 * Optimize block insertion by caching map of private keys to
185 * public keys in memory?
186 */
187static int cache_keys;
188
189
190/**
184 * Task run during shutdown. 191 * Task run during shutdown.
185 * 192 *
186 * @param cls unused 193 * @param cls unused
@@ -388,11 +395,18 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
388 395
389 expire = GNUNET_GNSRECORD_record_get_expiration_time (rd_public_count, 396 expire = GNUNET_GNSRECORD_record_get_expiration_time (rd_public_count,
390 rd_public); 397 rd_public);
391 block = GNUNET_GNSRECORD_block_create (key, 398 if (cache_keys)
392 expire, 399 block = GNUNET_GNSRECORD_block_create2 (key,
393 label, 400 expire,
394 rd_public, 401 label,
395 rd_public_count); 402 rd_public,
403 rd_public_count);
404 else
405 block = GNUNET_GNSRECORD_block_create (key,
406 expire,
407 label,
408 rd_public,
409 rd_public_count);
396 if (NULL == block) 410 if (NULL == block)
397 { 411 {
398 GNUNET_break (0); 412 GNUNET_break (0);
@@ -585,6 +599,7 @@ put_gns_record (void *cls,
585static void 599static void
586publish_zone_dht_start (void *cls) 600publish_zone_dht_start (void *cls)
587{ 601{
602 (void) cls;
588 zone_publish_task = NULL; 603 zone_publish_task = NULL;
589 GNUNET_STATISTICS_update (statistics, 604 GNUNET_STATISTICS_update (statistics,
590 "Full zone iterations launched", 605 "Full zone iterations launched",
@@ -736,7 +751,9 @@ run (void *cls,
736 GNUNET_SCHEDULER_shutdown (); 751 GNUNET_SCHEDULER_shutdown ();
737 return; 752 return;
738 } 753 }
739 754 cache_keys = GNUNET_CONFIGURATION_get_value_yesno (c,
755 "namestore",
756 "CACHE_KEYS");
740 put_interval = INITIAL_PUT_INTERVAL; 757 put_interval = INITIAL_PUT_INTERVAL;
741 zone_publish_time_window_default = DEFAULT_ZONE_PUBLISH_TIME_WINDOW; 758 zone_publish_time_window_default = DEFAULT_ZONE_PUBLISH_TIME_WINDOW;
742 if (GNUNET_OK == 759 if (GNUNET_OK ==