-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Reputation penalty for sending empty block response #5814
Conversation
@@ -696,6 +699,10 @@ impl<B: BlockT> ChainSync<B> { | |||
} | |||
PeerSyncState::DownloadingStale(_) => { | |||
peer.state = PeerSyncState::Available; | |||
if blocks.is_empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we not doing this for the other states as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When doing full sync it is not that critical, as we'll get new blocks from other peers eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
bot merge |
Cannot merge; please ensure the pull request is mergeable and has approval from the project owner or at least 2 core devs. |
bot merge cancel |
bot merge |
Cannot merge; please ensure the pull request is mergeable and has approval from the project owner or at least 2 core devs. |
bot merge cancel |
This handles the following scenario:
Currently there's no penalty and the same request will be issues again.