All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tron.p2p.P2pConfig Maven / Gradle / Ivy

The newest version!
package org.tron.p2p;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import lombok.Data;
import org.tron.p2p.utils.NetUtil;

@Data
public class P2pConfig {
  private List seedNodes = new CopyOnWriteArrayList<>();
  private List activeNodes = new CopyOnWriteArrayList<>();
  private List trustNodes = new CopyOnWriteArrayList<>();
  private byte[] nodeID = NetUtil.getNodeId();
  private String ip = NetUtil.getExternalIp();
  private int port = 18888;
  private int version = 1;
  private int minConnections = 8;
  private int maxConnections = 50;
  private int minActiveConnections = 2;
  private int maxConnectionsWithSameIp = 2;
  private boolean discoverEnable = true;
  private boolean disconnectionPolicyEnable = false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy