/*
* This file is part of GNUnet.
- * (C)
+ * Copyright (C)
*
* GNUnet is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
*
* You should have received a copy of the GNU General Public License
* along with GNUnet; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
* @file sensor/test_pow_sign.c
/**
* Number of matching bits to use for generating proof-of-work
*/
-#define MATCHING_BITS 2
+#define MATCHING_BITS 5
/**
* Test timeout
/**
* Task used to shutdown / expire the test
*/
-static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
+static struct GNUNET_SCHEDULER_Task * shutdown_task;
/**
* Message to be exchanged
pow_cb (void *cls, struct GNUNET_SENSOR_crypto_pow_block *block)
{
void *response;
+ struct GNUNET_TIME_Absolute end_time;
+ struct GNUNET_TIME_Relative duration;
+ end_time = GNUNET_TIME_absolute_get();
+ duration = GNUNET_TIME_absolute_get_difference (block->timestamp, end_time);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received block:\n" "pow: %" PRIu64 ".\n", block->pow);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Block generation toke %s.\n",
+ GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_NO));
/* Test that the block is valid */
GNUNET_assert (MSG_SIZE ==
GNUNET_SENSOR_crypto_verify_pow_sign (block, MATCHING_BITS,