mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Do not bias outgoing connections towards fresh addresses
This change was suggested as Countermeasure 2 in Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman, Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report 2015/263. March 2015.
This commit is contained in:
parent
a8ff7c62ed
commit
f68ba3f67b
@ -63,8 +63,6 @@ double CAddrInfo::GetChance(int64_t nNow) const
|
|||||||
if (nSinceLastTry < 0)
|
if (nSinceLastTry < 0)
|
||||||
nSinceLastTry = 0;
|
nSinceLastTry = 0;
|
||||||
|
|
||||||
fChance *= 600.0 / (600.0 + nSinceLastSeen);
|
|
||||||
|
|
||||||
// deprioritize very recent attempts away
|
// deprioritize very recent attempts away
|
||||||
if (nSinceLastTry < 60 * 10)
|
if (nSinceLastTry < 60 * 10)
|
||||||
fChance *= 0.01;
|
fChance *= 0.01;
|
||||||
|
Loading…
Reference in New Issue
Block a user