aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-service-nse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nse/gnunet-service-nse.c')
-rw-r--r--src/nse/gnunet-service-nse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 3f04314a6..f4d4e3e2f 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -805,7 +805,10 @@ check_proof_of_work (const struct GNUNET_CRYPTO_EddsaPublicKey *pkey,
805 GNUNET_memcpy (&buf[sizeof(val)], 805 GNUNET_memcpy (&buf[sizeof(val)],
806 pkey, 806 pkey,
807 sizeof(struct GNUNET_CRYPTO_EddsaPublicKey)); 807 sizeof(struct GNUNET_CRYPTO_EddsaPublicKey));
808 GNUNET_CRYPTO_pow_hash (buf, sizeof(buf), &result); 808 GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof-of-work",
809 buf,
810 sizeof(buf),
811 &result);
809 return (count_leading_zeroes (&result) >= nse_work_required) ? GNUNET_YES 812 return (count_leading_zeroes (&result) >= nse_work_required) ? GNUNET_YES
810 : GNUNET_NO; 813 : GNUNET_NO;
811} 814}
@@ -857,7 +860,10 @@ find_proof (void *cls)
857 while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) 860 while ((counter != UINT64_MAX) && (i < ROUND_SIZE))
858 { 861 {
859 GNUNET_memcpy (buf, &counter, sizeof(uint64_t)); 862 GNUNET_memcpy (buf, &counter, sizeof(uint64_t));
860 GNUNET_CRYPTO_pow_hash (buf, sizeof(buf), &result); 863 GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof-of-work",
864 buf,
865 sizeof(buf),
866 &result);
861 if (nse_work_required <= count_leading_zeroes (&result)) 867 if (nse_work_required <= count_leading_zeroes (&result))
862 { 868 {
863 my_proof = counter; 869 my_proof = counter;