eosnetworkfoundation / mandel

Obsolete. Use https://github.com/AntelopeIO/leap instead.
Other
87 stars 30 forks source link

[3.1] Reduce net_plugin handshake messages in case of unavailable blocks #791

Closed heifner closed 2 years ago

heifner commented 2 years ago

In the case the full block log is not available, prevent handshake message being sent sync-fetch count times to peer. For example, if the client requested 1000 blocks not available by the node, net_plugin would respond with 1000 handshake messages. Disconnect from peer with benign_other so the peer will move on to a different peer to sync from. This is what we already do for blk_send_branch when a block is not available.

Resolves #790