mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-08-27 22:35:02 +00:00
count non replied tunnel requests per hop
Build Debian packages / bookworm (push) Failing after 13s
Build Debian packages / bullseye (push) Failing after 14s
Build Debian packages / trixie (push) Failing after 11s
Build on FreeBSD / with UPnP (push) Failing after 15m16s
Build on Ubuntu / Make with USE_UPNP=no (push) Failing after 3h14m25s
Build on Ubuntu / Make with USE_UPNP=yes (push) Failing after 3h14m13s
Build containers / Building container for linux/amd64 (push) Failing after 30s
Build containers / Building container for linux/arm64 (push) Failing after 30s
Build containers / Building container for linux/arm/v7 (push) Failing after 30s
Build containers / Pushing merged manifest (push) Has been skipped
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Failing after 3h14m24s
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Failing after 3h14m11s
Build on OSX / Build on Intel x86_64 (push) Has been cancelled
Build on Windows / CMake i686 (push) Has been cancelled
Build on Windows / CMake ucrt-x86_64 (push) Has been cancelled
Build on Windows / CMake x86_64 (push) Has been cancelled
Build on Windows / clang-x86_64 (push) Has been cancelled
Build on Windows / i686 (push) Has been cancelled
Build on Windows / ucrt-x86_64 (push) Has been cancelled
Build on Windows / x86_64 (push) Has been cancelled
Build on Windows / CMake clang-x86_64 (push) Has been cancelled
Build on Windows / XP (push) Has been cancelled
Build containers / Building container for linux/386 (push) Failing after 28s
Build on OSX / Build on ARM64 (push) Has been cancelled
Build Debian packages / bookworm (push) Failing after 13s
Build Debian packages / bullseye (push) Failing after 14s
Build Debian packages / trixie (push) Failing after 11s
Build on FreeBSD / with UPnP (push) Failing after 15m16s
Build on Ubuntu / Make with USE_UPNP=no (push) Failing after 3h14m25s
Build on Ubuntu / Make with USE_UPNP=yes (push) Failing after 3h14m13s
Build containers / Building container for linux/amd64 (push) Failing after 30s
Build containers / Building container for linux/arm64 (push) Failing after 30s
Build containers / Building container for linux/arm/v7 (push) Failing after 30s
Build containers / Pushing merged manifest (push) Has been skipped
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Failing after 3h14m24s
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Failing after 3h14m11s
Build on OSX / Build on Intel x86_64 (push) Has been cancelled
Build on Windows / CMake i686 (push) Has been cancelled
Build on Windows / CMake ucrt-x86_64 (push) Has been cancelled
Build on Windows / CMake x86_64 (push) Has been cancelled
Build on Windows / clang-x86_64 (push) Has been cancelled
Build on Windows / i686 (push) Has been cancelled
Build on Windows / ucrt-x86_64 (push) Has been cancelled
Build on Windows / x86_64 (push) Has been cancelled
Build on Windows / CMake clang-x86_64 (push) Has been cancelled
Build on Windows / XP (push) Has been cancelled
Build containers / Building container for linux/386 (push) Failing after 28s
Build on OSX / Build on ARM64 (push) Has been cancelled
This commit is contained in:
@@ -129,7 +129,7 @@ namespace data
|
||||
auto participations = pt.get_child (PEER_PROFILE_SECTION_PARTICIPATION);
|
||||
m_NumTunnelsAgreed = participations.get (PEER_PROFILE_PARTICIPATION_AGREED, 0);
|
||||
m_NumTunnelsDeclined = participations.get (PEER_PROFILE_PARTICIPATION_DECLINED, 0);
|
||||
m_NumTunnelsNonReplied = participations.get (PEER_PROFILE_PARTICIPATION_NON_REPLIED, 0);
|
||||
m_NumTunnelsNonReplied = participations.get (PEER_PROFILE_PARTICIPATION_NON_REPLIED, 0.0f);
|
||||
}
|
||||
catch (boost::property_tree::ptree_bad_path& ex)
|
||||
{
|
||||
@@ -173,11 +173,15 @@ namespace data
|
||||
}
|
||||
}
|
||||
|
||||
void RouterProfile::TunnelNonReplied ()
|
||||
void RouterProfile::TunnelNonReplied (int tunnelLength)
|
||||
{
|
||||
m_NumTunnelsNonReplied++;
|
||||
if (!tunnelLength) return;
|
||||
if (tunnelLength == 1)
|
||||
m_NumTunnelsNonReplied++;
|
||||
else
|
||||
m_NumTunnelsNonReplied += 1.0f/tunnelLength;
|
||||
UpdateTime ();
|
||||
if (m_NumTunnelsNonReplied > 2*m_NumTunnelsAgreed && m_NumTunnelsNonReplied > 3)
|
||||
if (m_NumTunnelsNonReplied > m_NumTunnelsAgreed + m_NumTunnelsDeclined && m_NumTunnelsNonReplied > 3)
|
||||
{
|
||||
m_LastDeclineTime = i2p::util::GetSecondsSinceEpoch ();
|
||||
}
|
||||
@@ -231,7 +235,7 @@ namespace data
|
||||
isBad = m_ProfilesRng () % m_NumTunnelsDeclined; // only zero means not bad
|
||||
if (!isBad && IsLowPartcipationRate ())
|
||||
{
|
||||
auto failed = m_NumTunnelsDeclined + m_NumTunnelsNonReplied - m_NumTunnelsAgreed;
|
||||
auto failed = m_NumTunnelsDeclined + (int)m_NumTunnelsNonReplied - m_NumTunnelsAgreed;
|
||||
if (failed > 0)
|
||||
isBad = m_ProfilesRng () % failed; // only zero means not bad
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user