Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add BlockPeer interface to P2P #75

Closed
Tracked by #1
shuse2 opened this issue Feb 28, 2023 · 1 comment · Fixed by #102
Closed
Tracked by #1

Add BlockPeer interface to P2P #75

shuse2 opened this issue Feb 28, 2023 · 1 comment · Fixed by #102
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Feb 28, 2023

Description

Add BlockPeer interface to P2P and replace the usage of p2p.ApplyPenalty(pid, p2p.MaxPenaltyScore) with `p2p.BlockPeer(pid)

Motivation

Simplify the usage of the applying penalty since from the other packages we mostly block the peer immediately

@shuse2
Copy link
Collaborator Author

shuse2 commented Mar 3, 2023

This issue is actually invalid. it is valid that in the event handling, ApplyPenalty should not be used, and on request handling, it should be used. However, there are also requesting scenario which ApplyPenalty needs to be used. In this case, still Connenction.ApplyPenalty is required.

Therefore, it will not help much event if we add the ApplyPenalty to the ResponseWriter

@shuse2 shuse2 added status: invalid This doesn't seem right type: improvement and removed type: refactoring status: invalid This doesn't seem right labels Mar 9, 2023
@shuse2 shuse2 changed the title Move ApplyPenalty on P2P to ResponseWriter Add BlockPeer interface to P2P Mar 9, 2023
@matjazv matjazv self-assigned this Mar 14, 2023
@Madhulearn Madhulearn added this to the Sprint 9 milestone Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants