aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/revocation_api.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-05-25 11:22:07 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-05-25 11:22:07 +0200
commit19cd0e6d0eca5192a9c8f4f005abd85d531949f1 (patch)
treecc9745d840344074c69e0e96e1cc57761471e7f8 /src/revocation/revocation_api.c
parent2886db8f0b7628eda4aebd8d1a3b4effc1d1d62d (diff)
downloadgnunet-19cd0e6d0eca5192a9c8f4f005abd85d531949f1.tar.gz
gnunet-19cd0e6d0eca5192a9c8f4f005abd85d531949f1.zip
add some more debug output
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r--src/revocation/revocation_api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index 39fdb8b6f..3789e6799 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -394,7 +394,6 @@ static unsigned int
394count_leading_zeroes (const struct GNUNET_HashCode *hash) 394count_leading_zeroes (const struct GNUNET_HashCode *hash)
395{ 395{
396 unsigned int hash_count; 396 unsigned int hash_count;
397
398 hash_count = 0; 397 hash_count = 0;
399 while ((0 == GNUNET_CRYPTO_hash_get_bit (hash, hash_count))) 398 while ((0 == GNUNET_CRYPTO_hash_get_bit (hash, hash_count)))
400 hash_count++; 399 hash_count++;
@@ -436,6 +435,7 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow,
436 + sizeof (struct GNUNET_TIME_AbsoluteNBO) 435 + sizeof (struct GNUNET_TIME_AbsoluteNBO)
437 + sizeof (uint64_t)] GNUNET_ALIGN; 436 + sizeof (uint64_t)] GNUNET_ALIGN;
438 struct GNUNET_REVOCATION_SignaturePurposePS spurp; 437 struct GNUNET_REVOCATION_SignaturePurposePS spurp;
438 struct GNUNET_CRYPTO_HashAsciiEncoded h_str;
439 struct GNUNET_HashCode result; 439 struct GNUNET_HashCode result;
440 struct GNUNET_TIME_Absolute ts; 440 struct GNUNET_TIME_Absolute ts;
441 struct GNUNET_TIME_Absolute exp; 441 struct GNUNET_TIME_Absolute exp;
@@ -492,6 +492,12 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow,
492 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 492 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
493 "Score %u with %" PRIu64 " (#%u)\n", 493 "Score %u with %" PRIu64 " (#%u)\n",
494 tmp_score, pow_val, i); 494 tmp_score, pow_val, i);
495
496 GNUNET_CRYPTO_hash_to_enc (&result,
497 &h_str);
498 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
499 "Hash: %s\n", (char*)&h_str);
500
495 score += tmp_score; 501 score += tmp_score;
496 502
497 } 503 }