diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2010-09-29 08:55:11 -0700 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2010-09-29 11:49:43 -0700 |
commit | 11910cf5b32edfd6b900386d37bb69c7592174c1 (patch) | |
tree | 1b740c0062fc0eca5e269bd7248db8ec407e0395 /src/or/or.h | |
parent | 0744a175afa559435bd0e3cdb53891282469e0ee (diff) | |
download | tor-11910cf5b32edfd6b900386d37bb69c7592174c1.tar.gz tor-11910cf5b32edfd6b900386d37bb69c7592174c1.zip |
Do away with the complexity of the network liveness detection.
We really should ignore any timeouts that have *no* network activity for their
entire measured lifetime, now that we have the 95th percentile measurement
changes. Usually this is up to a minute, even on fast connections.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/or/or.h b/src/or/or.h index 6c398b7dcb..dc46684133 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2961,26 +2961,6 @@ typedef uint32_t build_time_t; /** Save state every 10 circuits */ #define CBT_SAVE_STATE_EVERY 10 -/* Circuit Build Timeout network liveness constants */ - -/** - * Have we received a cell in the last N circ attempts? - * - * This tells us when to temporarily switch back to - * BUILD_TIMEOUT_INITIAL_VALUE until we start getting cells, - * at which point we switch back to computing the timeout from - * our saved history. - */ -#define CBT_NETWORK_NONLIVE_TIMEOUT_COUNT 3 - -/** - * This tells us when to toss out the last streak of N timeouts. - * - * If instead we start getting cells, we switch back to computing the timeout - * from our saved history. - */ -#define CBT_NETWORK_NONLIVE_DISCARD_COUNT (CBT_NETWORK_NONLIVE_TIMEOUT_COUNT*2) - /* Circuit build times consensus parameters */ /** @@ -3021,9 +3001,7 @@ double circuit_build_times_quantile_cutoff(void); #define CBT_DEFAULT_TIMEOUT_INITIAL_VALUE (60*1000) int32_t circuit_build_times_initial_timeout(void); -#if CBT_DEFAULT_MAX_RECENT_TIMEOUT_COUNT < 1 || \ - CBT_NETWORK_NONLIVE_DISCARD_COUNT < 1 || \ - CBT_NETWORK_NONLIVE_TIMEOUT_COUNT < 1 +#if CBT_DEFAULT_MAX_RECENT_TIMEOUT_COUNT < 1 #error "RECENT_CIRCUITS is set too low." #endif @@ -3033,8 +3011,6 @@ typedef struct { time_t network_last_live; /** If the network is not live, how many timeouts has this caused? */ int nonlive_timeouts; - /** If the network is not live, have we yet discarded our history? */ - int nonlive_discarded; /** Circular array of circuits that have made it to the first hop. Slot is * 1 if circuit timed out, 0 if circuit succeeded */ int8_t *timeouts_after_firsthop; @@ -3042,12 +3018,6 @@ typedef struct { int num_recent_circs; /** Index into circular array. */ int after_firsthop_idx; - /** Timeout gathering is suspended if non-zero. The old timeout value - * is stored here in that case. */ - double suspended_timeout; - /** Timeout gathering is suspended if non-zero. The old close value - * is stored here in that case. */ - double suspended_close_timeout; } network_liveness_t; /** Structure for circuit build times history */ |