mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 17:15:16 -04:00
- added random bias to search and tunnel request maximum depth
- added random (and biased) re-routing of tunnel request to improve tunnel length. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4130 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bcdf536c98
commit
8e6962808d
2 changed files with 47 additions and 5 deletions
|
@ -164,6 +164,7 @@ class TurtleRequestInfo
|
|||
public:
|
||||
TurtlePeerId origin ; // where the request came from.
|
||||
uint32_t time_stamp ; // last time the tunnel was actually used. Used for cleaning old tunnels.
|
||||
int depth ; // depth of the request. Used to optimize tunnel length.
|
||||
};
|
||||
|
||||
class TurtleTunnel
|
||||
|
@ -402,6 +403,11 @@ class p3turtle: public p3Service, /*public pqiMonitor,*/ public RsTurtle,/* publ
|
|||
/// used to force digging new tunnels
|
||||
bool _force_digg_new_tunnels ;
|
||||
|
||||
/// used as a bias to introduce randomness in a consistent way, for
|
||||
/// altering tunnel request depths, and tunnel re-routing actions.
|
||||
///
|
||||
uint32_t _random_bias ;
|
||||
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
// debug function
|
||||
void dumpState() ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue