mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
[style] clean code
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
3c65012a63
commit
86fc12e395
18 changed files with 175 additions and 175 deletions
|
@ -254,7 +254,7 @@ namespace tunnel
|
|||
std::shared_ptr<ZeroHopsOutboundTunnel> CreateZeroHopsOutboundTunnel (std::shared_ptr<TunnelPool> pool);
|
||||
|
||||
// Calculating of tunnel creation success rate
|
||||
void SuccesiveTunnelCreation()
|
||||
void SuccesiveTunnelCreation()
|
||||
{
|
||||
// total TCSR
|
||||
m_TotalNumSuccesiveTunnelCreations++;
|
||||
|
@ -263,14 +263,14 @@ namespace tunnel
|
|||
m_TunnelCreationSuccessRate = alpha * 1 + (1 - alpha) * m_TunnelCreationSuccessRate;
|
||||
|
||||
}
|
||||
void FailedTunnelCreation()
|
||||
void FailedTunnelCreation()
|
||||
{
|
||||
m_TotalNumFailedTunnelCreations++;
|
||||
|
||||
|
||||
double alpha = TCSR_SMOOTHING_CONSTANT + (1 - TCSR_SMOOTHING_CONSTANT)/++m_TunnelCreationAttemptsNum;
|
||||
m_TunnelCreationSuccessRate = alpha * 0 + (1 - alpha) * m_TunnelCreationSuccessRate;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsRunning;
|
||||
|
@ -288,7 +288,7 @@ namespace tunnel
|
|||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_ENPOINT_MESSAGE_SIZE> > m_I2NPTunnelEndpointMessagesMemoryPool;
|
||||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_MESSAGE_SIZE> > m_I2NPTunnelMessagesMemoryPool;
|
||||
// count of tunnels for total TCSR algorithm
|
||||
int m_TotalNumSuccesiveTunnelCreations, m_TotalNumFailedTunnelCreations;
|
||||
int m_TotalNumSuccesiveTunnelCreations, m_TotalNumFailedTunnelCreations;
|
||||
double m_TunnelCreationSuccessRate;
|
||||
int m_TunnelCreationAttemptsNum;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue