diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-01-02 22:12:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-01-02 22:12:02 +0100 |
commit | e272dddaa9020f43c2cc58d8c318890bb9fe10c4 (patch) | |
tree | b4fb989849b307861a6c1be4f5d844f93c01172a /src/nse | |
parent | 1b39a393307288188d790c8e89f794a136a2653f (diff) | |
download | gnunet-e272dddaa9020f43c2cc58d8c318890bb9fe10c4.tar.gz gnunet-e272dddaa9020f43c2cc58d8c318890bb9fe10c4.zip |
-fix typos causing FTBFS:
Diffstat (limited to 'src/nse')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 35278db29..56014752d 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -505,12 +505,18 @@ get_matching_bits (struct GNUNET_TIME_Absolute timestamp, | |||
505 | { | 505 | { |
506 | struct GNUNET_HashCode timestamp_hash; | 506 | struct GNUNET_HashCode timestamp_hash; |
507 | struct GNUNET_HashCode pid_hash; | 507 | struct GNUNET_HashCode pid_hash; |
508 | struct GNUNET_HashCode xor; | ||
508 | 509 | ||
509 | GNUNET_CRYPTO_hash (×tamp.abs_value_us, | 510 | GNUNET_CRYPTO_hash (×tamp.abs_value_us, |
510 | sizeof(timestamp.abs_value_us), | 511 | sizeof(timestamp.abs_value_us), |
511 | ×tamp_hash); | 512 | ×tamp_hash); |
512 | GNUNET_CRYPTO_hash (id, sizeof(struct GNUNET_PeerIdentity), &pid_hash); | 513 | GNUNET_CRYPTO_hash (id, |
513 | return GNUNET_CRYPTO_hash_matching_bits (×tamp_hash, &pid_hash); | 514 | sizeof(struct GNUNET_PeerIdentity), |
515 | &pid_hash); | ||
516 | GNUNET_CRYPTO_hash_xor (&pid_hash, | ||
517 | ×tamp_hash, | ||
518 | &xor); | ||
519 | return GNUNET_CRYPTO_hash_count_leading_zeros (&xor); | ||
514 | } | 520 | } |
515 | 521 | ||
516 | 522 | ||
@@ -797,7 +803,7 @@ check_proof_of_work (const struct GNUNET_CRYPTO_EddsaPublicKey *pkey, | |||
797 | buf, | 803 | buf, |
798 | sizeof(buf), | 804 | sizeof(buf), |
799 | &result); | 805 | &result); |
800 | return (GNUNET_CRYPTO_hash_count_leading_zeroes (&result) >= | 806 | return (GNUNET_CRYPTO_hash_count_leading_zeros (&result) >= |
801 | nse_work_required) | 807 | nse_work_required) |
802 | ? GNUNET_YES | 808 | ? GNUNET_YES |
803 | : GNUNET_NO; | 809 | : GNUNET_NO; |
@@ -862,7 +868,7 @@ find_proof (void *cls) | |||
862 | sizeof(buf), | 868 | sizeof(buf), |
863 | &result); | 869 | &result); |
864 | if (nse_work_required <= | 870 | if (nse_work_required <= |
865 | GNUNET_CRYPTO_hash_count_leading_zeroes (&result)) | 871 | GNUNET_CRYPTO_hash_count_leading_zeros (&result)) |
866 | { | 872 | { |
867 | my_proof = counter; | 873 | my_proof = counter; |
868 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 874 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |