diff options
| author | Cory Fields <[email protected]> | 2017-02-07 12:02:02 -0500 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2017-02-13 18:55:34 -0500 |
| commit | c45b9fb54c5ca068a5e276c3bd6ebf4ae720f6f7 (patch) | |
| tree | 0bdc565d53b939f0f227b108406c82f034cb5e61 /src/script | |
| parent | Merge #9712: bench: Fix initialization order in registration (diff) | |
| download | discoin-c45b9fb54c5ca068a5e276c3bd6ebf4ae720f6f7.tar.xz discoin-c45b9fb54c5ca068a5e276c3bd6ebf4ae720f6f7.zip | |
net: correctly ban before the handshake is complete
7a8c251901 made a change to avoid getting into SendMessages() until the
version handshake (VERSION + VERACK) is complete. That was done to avoid
leaking out messages to nodes who could connect, but never bothered sending
us their version/verack.
Unfortunately, the ban tally and possible disconnect are done as part of
SendMessages(). So after 7a8c251901, if a peer managed to do something
bannable before completing the handshake (say send 100 non-version messages
before their version), they wouldn't actually end up getting
disconnected/banned. That's fixed here by checking the banscore as part of
ProcessMessages() in addition to SendMessages().
Diffstat (limited to 'src/script')
0 files changed, 0 insertions, 0 deletions