Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only allow one session per peer for block/header sync (#3402)
Description --- Adds check for existing block sync sessions per peer. Improve logging Motivation and Context --- When shutting down my local node, I've observed many blksync rpc sessions for a single peer. It is unclear why/how the peer is creating these sessions and keeping them up. I've attempted to recreate this by constantly attempting a sync and then dropping the stream after it starts but RPC appeared to handle that correctly. By forbidding this action for block sync, any client that misbehaves will get an error response and that should help to narrow down where this issue originates. How Has This Been Tested? --- Manually.
- Loading branch information
Showing
3 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters