code: function PeerOptions(options) {
    if (!(this instanceof PeerOptions))
      return new PeerOptions(options);
  
    this.network = Network.primary;
    this.logger = Logger.global;
  
    this.createSocket = tcp.createSocket;
    this.version = common.PROTOCOL_VERSION;
    this.services = common.LOCAL_SERVICES;
    this.agent = common.USER_AGENT;
    this.noRelay = false;
    this.spv = false;
    this.compact = false;
    this.headers = false;
    this.banScore = common.BAN_SCORE;
  
    this.getHeight = PeerOptions.getHeight;
    this.isFull = PeerOptions.isFull;
    this.hasWitness = PeerOptions.hasWitness;
    this.createNonce = PeerOptions.createNonce;
    this.hasNonce = PeerOptions.hasNonce;
    this.getRate = PeerOptions.getRate;
  
    if (options)
      this.fromOptions(options);
  }
docs: PeerOptions
  @alias module:net.PeerOptions
  @constructor