org.tron.p2p.P2pConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libp2p Show documentation
Show all versions of libp2p Show documentation
libp2p is a p2p network SDK implemented in java language.
The newest version!
package org.tron.p2p;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import lombok.Data;
import org.tron.p2p.dns.update.PublishConfig;
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.getExternalIpV4();
private String lanIp = NetUtil.getLanIP();
private String ipv6 = NetUtil.getExternalIpV6();
private int port = 18888;
private int networkId = 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;
private boolean nodeDetectEnable = false;
//dns read config
private List treeUrls = new ArrayList<>();
//dns publish config
private PublishConfig publishConfig = new PublishConfig();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy