Changes between Initial Version and Version 1 of Ticket #24857, comment 23


Ignore:
Timestamp:
May 22, 2018, 9:55:03 PM (14 months ago)
Author:
cypherpunks
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24857, comment 23

    initial v1  
    1 > cypherpunks' comments are wrong about this bug
    2 Something like this:
    3 {{{
    4 -    consensus_diff_queue_diff_work(c, most_recent);
    5 +    if (consensus_diff_queue_diff_work(c, most_recent)) {
    6 +      // We encountered an error (temporary?)
    7 +      unsigned u;
    8 +      for (u = 0; u < n_diff_compression_methods(); ++u) {
    9 +        compress_method_t method = compress_diffs_with[u];
    10 +        cdm_diff_ht_set_status(flavor, this_sha3, most_recent_sha3,
    11 +                               method, CDM_DIFF_ERROR, NULL);
    12 +      }
    13 +    }
    14 }}}
    15 
    16 Plus something like this:
    17 {{{
    18 /**
    19  * Periodic (30m or something). Remove from the hash table entry
    20  * with (temporary?) error status.
    21  */
    22 void
    23 cdm_diff_ht_cleanup(void)
    24 {
    25   cdm_diff_t **diff, **next;
    26   for (diff = HT_START(cdm_diff_ht, &cdm_diff_ht); diff; diff = next) {
    27     cdm_diff_t *this = *diff;
    28 
    29     if ((*diff)->cdm_diff_status == CDM_DIFF_ERROR) {
    30       next = HT_NEXT_RMV(cdm_diff_ht, &cdm_diff_ht, diff);
    31       cdm_diff_free(this);
    32       continue;
    33     }
    34     next = HT_NEXT(cdm_diff_ht, &cdm_diff_ht, diff);
    35   }
    36 }
    37 }}}
    38 Replace CDM_DIFF_ERROR by (new) CDM_DIFF_TEMP_ERROR maybe?
     1Something weird, wrong, typos.