diff options
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r-- | src/revocation/revocation_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 9080ab862..b8c458e4f 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -460,7 +460,7 @@ check_signature (const struct GNUNET_REVOCATION_PowP *pow) | |||
460 | * Check if the given proof-of-work is valid. | 460 | * Check if the given proof-of-work is valid. |
461 | * | 461 | * |
462 | * @param pow proof of work | 462 | * @param pow proof of work |
463 | * @param matching_bits how many bits must match (configuration) | 463 | * @param difficulty how many bits must match (configuration) LSD0001: D |
464 | * @param epoch_duration length of single epoch in configuration | 464 | * @param epoch_duration length of single epoch in configuration |
465 | * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not | 465 | * @return #GNUNET_YES if the @a pow is acceptable, #GNUNET_NO if not |
466 | */ | 466 | */ |
@@ -477,6 +477,7 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
477 | struct GNUNET_TIME_Absolute exp; | 477 | struct GNUNET_TIME_Absolute exp; |
478 | struct GNUNET_TIME_Relative ttl; | 478 | struct GNUNET_TIME_Relative ttl; |
479 | struct GNUNET_TIME_Relative buffer; | 479 | struct GNUNET_TIME_Relative buffer; |
480 | /* LSD0001: D' */ | ||
480 | unsigned int score = 0; | 481 | unsigned int score = 0; |
481 | unsigned int tmp_score = 0; | 482 | unsigned int tmp_score = 0; |
482 | unsigned int epochs; | 483 | unsigned int epochs; |
@@ -535,7 +536,8 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
535 | score = score / POW_COUNT; | 536 | score = score / POW_COUNT; |
536 | if (score < difficulty) | 537 | if (score < difficulty) |
537 | return GNUNET_NO; | 538 | return GNUNET_NO; |
538 | epochs = score - difficulty; | 539 | /* LSD0001: (D'-D+1) */ |
540 | epochs = score - difficulty + 1; | ||
539 | 541 | ||
540 | /** | 542 | /** |
541 | * Check expiration | 543 | * Check expiration |