GetPeersRequest constructor

GetPeersRequest({
  1. NodeAddress? senderNodeAddress,
  2. int? nonce,
  3. Iterable<int>? supportedCapabilities,
  4. Iterable<Peer>? reportedPeers,
})

Implementation

factory GetPeersRequest({
  NodeAddress? senderNodeAddress,
  $core.int? nonce,
  $core.Iterable<$core.int>? supportedCapabilities,
  $core.Iterable<Peer>? reportedPeers,
}) {
  final $result = create();
  if (senderNodeAddress != null) {
    $result.senderNodeAddress = senderNodeAddress;
  }
  if (nonce != null) {
    $result.nonce = nonce;
  }
  if (supportedCapabilities != null) {
    $result.supportedCapabilities.addAll(supportedCapabilities);
  }
  if (reportedPeers != null) {
    $result.reportedPeers.addAll(reportedPeers);
  }
  return $result;
}