aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-13 18:33:43 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-13 18:33:43 +0200
commitfb77da9477657e2dc077595da2b2a38c52d2123e (patch)
treebafd172ec191bf4f464ebb67a681f992fd49a5fa /src/zonemaster
parentc5b7feaca717a5f81ff922d9b3ba1a195b1dfa9d (diff)
downloadgnunet-fb77da9477657e2dc077595da2b2a38c52d2123e.tar.gz
gnunet-fb77da9477657e2dc077595da2b2a38c52d2123e.zip
properly calculate min_relative_record_time without imposing global max, use constant from DHT API where applicable instead of defining our own
Diffstat (limited to 'src/zonemaster')
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index 78b903bd2..0a562beb1 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -76,12 +76,6 @@
76#define MAXIMUM_ZONE_ITERATION_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15) 76#define MAXIMUM_ZONE_ITERATION_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15)
77 77
78/** 78/**
79 * The default put interval for the zone iteration. In case
80 * no option is found
81 */
82#define DEFAULT_ZONE_PUBLISH_TIME_WINDOW GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
83
84/**
85 * The factor the current zone iteration interval is divided by for each 79 * The factor the current zone iteration interval is divided by for each
86 * additional new record 80 * additional new record
87 */ 81 */
@@ -684,8 +678,7 @@ zone_iteration_finished (void *cls)
684 calculate_put_interval (); 678 calculate_put_interval ();
685 /* reset for next iteration */ 679 /* reset for next iteration */
686 min_relative_record_time 680 min_relative_record_time
687 = GNUNET_TIME_relative_multiply (GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY, 681 = GNUNET_TIME_UNIT_FOREVER_REL;
688 PUBLISH_OPS_PER_EXPIRATION);
689 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 682 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
690 "Zone iteration finished. Adjusted zone iteration interval to %s\n", 683 "Zone iteration finished. Adjusted zone iteration interval to %s\n",
691 GNUNET_STRINGS_relative_time_to_string (target_iteration_velocity_per_record, 684 GNUNET_STRINGS_relative_time_to_string (target_iteration_velocity_per_record,
@@ -838,8 +831,7 @@ run (void *cls,
838 (void) service; 831 (void) service;
839 last_put_100 = GNUNET_TIME_absolute_get (); /* first time! */ 832 last_put_100 = GNUNET_TIME_absolute_get (); /* first time! */
840 min_relative_record_time 833 min_relative_record_time
841 = GNUNET_TIME_relative_multiply (GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY, 834 = GNUNET_TIME_UNIT_FOREVER_REL;
842 PUBLISH_OPS_PER_EXPIRATION);
843 target_iteration_velocity_per_record = INITIAL_ZONE_ITERATION_INTERVAL; 835 target_iteration_velocity_per_record = INITIAL_ZONE_ITERATION_INTERVAL;
844 namestore_handle = GNUNET_NAMESTORE_connect (c); 836 namestore_handle = GNUNET_NAMESTORE_connect (c);
845 if (NULL == namestore_handle) 837 if (NULL == namestore_handle)
@@ -852,7 +844,7 @@ run (void *cls,
852 cache_keys = GNUNET_CONFIGURATION_get_value_yesno (c, 844 cache_keys = GNUNET_CONFIGURATION_get_value_yesno (c,
853 "namestore", 845 "namestore",
854 "CACHE_KEYS"); 846 "CACHE_KEYS");
855 zone_publish_time_window_default = DEFAULT_ZONE_PUBLISH_TIME_WINDOW; 847 zone_publish_time_window_default = GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY;
856 if (GNUNET_OK == 848 if (GNUNET_OK ==
857 GNUNET_CONFIGURATION_get_value_time (c, 849 GNUNET_CONFIGURATION_get_value_time (c,
858 "zonemaster", 850 "zonemaster",