interceptPeerDial method

  1. @override
bool interceptPeerDial(
  1. PeerId peerId
)
override

Tests whether we're permitted to Dial the specified peer.

This is called by the network implementation when dialling a peer.

Implementation

@override
bool interceptPeerDial(PeerId peerId) {
  if (isPeerBlocked(peerId)) {
    _logger.fine('Blocked peer dial: $peerId');
    return false;
  }
  return true;
}