From db55ab0bde2246ff9d2499dbde4d5220b6aba828 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 19 Oct 2014 22:02:00 +0000 Subject: [PATCH] weighted maximum length of a msg in grouter inversely to how much it has spread git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7625 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/grouter/p3grouter.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/grouter/p3grouter.cc b/libretroshare/src/grouter/p3grouter.cc index 902e2ce4d..fbb3345ef 100644 --- a/libretroshare/src/grouter/p3grouter.cc +++ b/libretroshare/src/grouter/p3grouter.cc @@ -438,7 +438,7 @@ void p3GRouter::routePendingObjects() // send new_item->PeerId(pids[*its]) ; - new_item->randomized_distance += computeRandomDistanceIncrement(pids[*its],new_item->destination_key) ; + new_item->randomized_distance += routing_friend_indices.size() * computeRandomDistanceIncrement(pids[*its],new_item->destination_key) ; sendItem(new_item) ; } @@ -1190,7 +1190,8 @@ void p3GRouter::debugDump() grouter_debug() << " Routing matrix: " << std::endl; - _routing_matrix.debugDump() ; + if(_debug_enabled) + _routing_matrix.debugDump() ; }