-
Notifications
You must be signed in to change notification settings - Fork 8
call the connection gater when accepting connections and after crypto handshake #55
Conversation
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.
This is missing tests. Unfortunately we're using gingko which nobody on the team is really familiar with -- and this implies some ramp up cost to be able to enhance the listener test suite.
@raulk I couldn't figure out how to add tests for this in this repo back then so I implemented all these tests in the |
@aarshkshah1992 I removed ginkgo in #60. |
This needs a release in go-libp2p-core to we can import a proper version. Other than that, it's good to go now. |
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.
Upgraded go-libp2p-core to v0.5.5.
For libp2p/go-libp2p#872.
Core PR at libp2p/go-libp2p-core#139.
We apply gating to accepted(inbound connections from a socket before we begin upgrading them) AND secured(the security protocol has been negotiated) connections in the upgrader.
However, please note that we don't apply gating to upgraded connections here as we want to send a Disconnect message with an appropriate reason for them. Hence, the best place to do it is the Swarm.