summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 8b8a87cfe7..848b7e866e 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -212,6 +212,13 @@ static int new_route_len(double cw, routerinfo_t **rarray, int rarray_len) {
return routelen;
}
+int onion_new_route_len(void) {
+ directory_t *dir;
+
+ router_get_directory(&dir);
+ return new_route_len(options.CoinWeight, dir->routers, dir->n_routers);
+}
+
static int count_acceptable_routers(routerinfo_t **rarray, int rarray_len) {
int i, j;
int num=0;