#include "gnunet_block_lib.h"
#include "fs.h"
+#define DEBUG_FS GNUNET_YES
+
+#define DEBUG_FS_CLIENT GNUNET_NO
+
/**
* Should we introduce random latency in processing? Required for proper
#define SUPPORT_DELAYS GNUNET_NO
+/**
+ * At what frequency should our datastore load decrease
+ * automatically (since if we don't use it, clearly the
+ * load must be going down).
+ */
+#define DATASTORE_LOAD_AUTODECLINE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250)
+
+
/**
* A connected peer.
*/
struct GSF_LocalClient;
+/**
+ * Information kept per plan per request ('pe' module).
+ */
+struct GSF_RequestPlan;
/**
* Our connection to the datastore.
*/
extern unsigned int GSF_cover_content_count;
-
/**
* Our block context.
*/
extern struct GNUNET_BLOCK_Context *GSF_block_ctx;
+/**
+ * Are we introducing randomized delays for better anonymity?
+ */
+extern int GSF_enable_randomized_delays;
+
+/**
+ * Test if the DATABASE (GET) load on this peer is too high
+ * to even consider processing the query at
+ * all.
+ *
+ * @return GNUNET_YES if the load is too high to do anything (load high)
+ * GNUNET_NO to process normally (load normal)
+ * GNUNET_SYSERR to process for free (load low)
+ */
+int
+GSF_test_get_load_too_high_ (uint32_t priority);
+
+
+/**
+ * We've just now completed a datastore request. Update our
+ * datastore load calculations.
+ *
+ * @param start time when the datastore request was issued
+ */
+void
+GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);