Skip to content

Commit 6450bc3

Browse files
committed
Use the whitelist and not bind list to check whitelisting during IBD
- Previously the filtering was done using the bind list, which is incorrect. This changes the check to go against the -whitelist and matches the IPs, not ports.
1 parent e2d72a9 commit 6450bc3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Blockcore/P2P/Peer/NetworkPeerServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private NetworkPeerConnectionParameters CreateNetworkPeerConnectionParameters()
237237

238238
var clientLocalEndPoint = tcpClient.Client.LocalEndPoint as IPEndPoint;
239239

240-
bool endpointCanBeWhiteListed = this.connectionManagerSettings.Bind.Where(x => x.Whitelisted).Any(x => x.Endpoint.Contains(clientLocalEndPoint));
240+
bool endpointCanBeWhiteListed = this.connectionManagerSettings.Whitelist.Any(x => x.MatchIpOnly(clientLocalEndPoint));
241241

242242
if (endpointCanBeWhiteListed)
243243
{

0 commit comments

Comments
 (0)