From: Florian Dold Date: Tue, 28 Feb 2017 14:49:37 +0000 (+0100) Subject: set: different thresholds X-Git-Tag: taler-0.2.1~8^2~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b6bfe7cb157d4e64b674419a2f8e8e82f3d82f17;p=oweals%2Fgnunet.git set: different thresholds --- diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index b51939da0..90f52ff47 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c @@ -889,7 +889,7 @@ handle_p2p_strata_estimator (void *cls, } - if ( (GNUNET_YES == op->spec->force_full) || (diff > op->state->initial_size / 2)) + if ( (GNUNET_YES == op->spec->force_full) || (diff > op->state->initial_size / 4)) { LOG (GNUNET_ERROR_TYPE_INFO, "Sending full set (diff=%d, own set=%u)\n", @@ -1565,8 +1565,8 @@ handle_p2p_full_element (void *cls, } if ( (GNUNET_YES == op->spec->byzantine) && - (op->state->received_total > 128) && - (op->state->received_fresh < op->state->received_total / 3) ) + (op->state->received_total > 128 + op->state->received_fresh * 4) && + (op->state->received_fresh < op->state->received_total / 6) ) { /* The other peer gave us lots of old elements, there's something wrong. */ LOG (GNUNET_ERROR_TYPE_ERROR,