-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2783] Invert dependency between permissioning and p2p #1557
[PAN-2783] Invert dependency between permissioning and p2p #1557
Conversation
@@ -363,13 +359,6 @@ public P2PNetwork build() { | |||
|
|||
private P2PNetwork doBuild() { | |||
// Set up permissions | |||
// Fold NodePermissioningController into peerPermissions | |||
if (nodePermissioningController.isPresent()) { |
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 setup has been moved into RunnerBuilder
.
@@ -201,31 +184,6 @@ public void checkMaintainedConnectionPeers_connectingPeer() { | |||
verify(rlpxAgent, times(0)).connect(peer); | |||
} | |||
|
|||
@Test | |||
public void whenBuildingNetworkWithNodePermissioningWithoutBlockchainShouldThrowIllegalState() { |
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.
It is no longer possible to construct the corresponding PeerPermissions
object without supplying the nodePermissioning and blockchain objects.
@@ -269,71 +258,12 @@ public void rejectIncomingConnectionFromBlacklistedPeer() throws Exception { | |||
} | |||
} | |||
|
|||
@Test | |||
public void rejectIncomingConnectionFromNonWhitelistedPeer() throws Exception { |
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 case is covered more generically by the test rejectIncomingConnectionFromDisallowedPeer
.
Closing while tests are being debugged |
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. I'm glad to see this happening!
PR description
Invert the dependency between
p2p
andpermissioning
packages. This allows us to moveEnodeURL
(a p2p-specific datastructure) into thep2p
package.