Commit graph

17 commits

Author SHA1 Message Date
SChernykh
456f5d356f P2PServer: ban peers only after handshake finished and failed 2021-08-29 17:26:30 +02:00
SChernykh
14bb308794 P2PServer: clear m_missingBlockRequests when there is nothing missing 2021-08-27 21:09:35 +02:00
SChernykh
f9be0de8d2 P2PServer: ask peers about unknown blocks only once 2021-08-27 17:26:42 +02:00
SChernykh
81a12158fc P2PServer: don't add banned peers back to the peer list 2021-08-27 16:36:06 +02:00
SChernykh
3f1ee9ce4b TCPServer fixes
- Proper shutdown sequence, uv_close() must be called from the event loop thread
- Moved start_listening() to child class constructor because it must be ready before it can listen on sockets
- Added simple memory leak detector for Windows. Linux users can enjoy the leak sanitizer
2021-08-26 23:57:59 +02:00
SChernykh
dbf18c34a4 Fixed wrong uv loop in p2pserver::flush_cache() 2021-08-25 11:31:50 +02:00
SChernykh
7ab3c22114 Give only 5 seconds for new connections to complete handshake
This is to detect random port scans/non-p2pool connections quickly
2021-08-25 11:14:23 +02:00
SChernykh
a27577f735 Added log level 6 to reduce spam on level 5
Log level 5 is still default
2021-08-25 09:38:47 +02:00
SChernykh
09aedd9f9a Drop idle connections
Idle = didn't send any full messages in the last 5 minutes
2021-08-24 21:45:19 +02:00
SChernykh
6de98697a1 Only warn about lagging monerod if it's 2 or more blocks behind 2021-08-24 20:10:16 +02:00
SChernykh
20b3886bfb Less tolerance to lagging nodes
Ban nodes that are 5 or more Monero blocks behind.
2021-08-24 17:19:10 +02:00
SChernykh
69533fd209 Store only fully verified blocks in the cache 2021-08-24 13:46:38 +02:00
SChernykh
aba3bc50b8 Block cache WIP and other fixes
- Block cache is implemented only on Windows for now
- Tracking of background jobs
- More robust sidechain syncing
2021-08-24 11:42:41 +02:00
SChernykh
25ef5733a7 Skip duplicates in the saved peers list 2021-08-23 23:12:52 +02:00
SChernykh
fda80e3556 Sanity check 2021-08-23 23:09:59 +02:00
SChernykh
df52838433 Removed some noisy warning messages 2021-08-23 14:05:07 +02:00
SChernykh
510b7dbb85 Add files 2021-08-22 12:20:59 +02:00