- fix 2699
[oweals/gnunet.git] / src / consensus / gnunet-consensus.c
index 222ec3e9df7c6b224af2a85de23ef7cb4d29549b..a63575825f9898a020c67f91e5b193a99d8e8475 100644 (file)
@@ -288,6 +288,11 @@ run (void *cls, char *const *args, const char *cfgfile,
 {
   static char *session_str = "gnunet-consensus/test";
 
+  if (num_peers < replication)
+  {
+    fprintf (stderr, "k must be <=n\n");
+    return;
+  }
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "running gnunet-consensus\n");