diff options
author | Roger Dingledine <arma@torproject.org> | 2004-01-20 03:12:46 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-01-20 03:12:46 +0000 |
commit | 61723a1f6950855844a8a6eab25c2978c0bafc1d (patch) | |
tree | 3a9670e71b21b12ceceeb0e1f32b324c239eebfe /src/or/onion.c | |
parent | f5ebf4c712d693cab6c33909de40b39db654bd24 (diff) | |
download | tor-61723a1f6950855844a8a6eab25c2978c0bafc1d.tar.gz tor-61723a1f6950855844a8a6eab25c2978c0bafc1d.zip |
small default route when doing speed testing
svn:r1010
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index c1633c33c9..2f13458e46 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -185,10 +185,14 @@ static int new_route_len(double cw, routerinfo_t **rarray, int rarray_len) { assert((cw >= 0) && (cw < 1) && rarray); /* valid parameters */ - for(routelen=3; ; routelen++) { /* 3, increment until coinflip says we're done */ +#ifdef TOR_PERF + routelen = 2; +#else + for(routelen = 3; ; routelen++) { /* 3, increment until coinflip says we're done */ if (crypto_pseudo_rand_int(255) >= cw*255) /* don't extend */ break; } +#endif log_fn(LOG_DEBUG,"Chosen route length %d (%d routers available).",routelen, rarray_len); num_acceptable_routers = count_acceptable_routers(rarray, rarray_len); |