Age | Commit message (Collapse) | Author |
|
This allows incoming connections from peers which are only banned
due to an automatic misbehavior ban if doing so won't fill inbound.
These peers are preferred for eviction when inbound fills, but may
still be kept if they fall into the protected classes. This
eviction preference lasts the entire life of the connection even
if the ban expires.
If they misbehave again they'll still get disconnected.
The main purpose of banning on misbehavior is to prevent our
connections from being wasted on unhelpful peers such as ones
running incompatible consensus rules. For inbound peers this
can be better accomplished with eviction preferences.
A secondary purpose was to reduce resource waste from repeated
abuse but virtually any attacker can get a nearly unlimited
supply of addresses, so disconnection is about the best we can
do.
|
|
-BEGIN VERIFY SCRIPT-
sed -i "s/banMap/banmap/g" src/banman.h src/banman.cpp
sed -i "s/netAddr/net_addr/g" src/banman.h src/banman.cpp
sed -i "s/sinceUnixEpoch/since_unix_epoch/g" src/banman.h src/banman.cpp
sed -i "s/bantimeoffset/ban_time_offset/g" src/banman.h src/banman.cpp
sed -i "s/subNet/sub_net/g" src/banman.h src/banman.cpp
sed -i "s/banReason/ban_reason/g" src/banman.h src/banman.cpp
sed -i "s/notifyUI/notify_ui/g" src/banman.h src/banman.cpp
sed -i "s/banEntry/ban_entry/g" src/banman.h src/banman.cpp
sed -i "s/nStart/n_start/g" src/banman.h src/banman.cpp
-END VERIFY SCRIPT-
|
|
|
|
Avoid reassigning parameters.
|
|
-BEGIN VERIFY SCRIPT-
sed -i "s/clientInterface/m_client_interface/g" src/banman.h src/banman.cpp
sed -i "s/setBannedIsDirty/m_is_dirty/g" src/banman.h src/banman.cpp
sed -i "s/cs_setBanned/m_cs_banned/g" src/banman.h src/banman.cpp
sed -i "s/setBanned/m_banned/g" src/banman.h src/banman.cpp
-END VERIFY SCRIPT-
|
|
|