remove unneeded initializers
This commit is contained in:
@ -72,9 +72,6 @@ class InboundEstablishState {
|
||||
_alicePort = remotePort;
|
||||
_remoteHostId = new RemoteHostId(_aliceIP, _alicePort);
|
||||
_bobPort = localPort;
|
||||
_keyBuilder = null;
|
||||
_verificationAttempted = false;
|
||||
_complete = false;
|
||||
_currentState = STATE_UNKNOWN;
|
||||
_establishBegin = ctx.clock().now();
|
||||
}
|
||||
|
@ -86,13 +86,11 @@ class OutboundEstablishState {
|
||||
}
|
||||
_remotePeer = remotePeer;
|
||||
_introKey = introKey;
|
||||
_keyBuilder = null;
|
||||
_queuedMessages = new LinkedBlockingQueue();
|
||||
_currentState = STATE_UNKNOWN;
|
||||
_establishBegin = ctx.clock().now();
|
||||
_remoteAddress = addr;
|
||||
_introductionNonce = -1;
|
||||
_complete = false;
|
||||
prepareSessionRequest();
|
||||
if ( (addr != null) && (addr.getIntroducerCount() > 0) ) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
|
@ -47,7 +47,6 @@ class OutboundMessageFragments {
|
||||
_transport = transport;
|
||||
// _throttle = throttle;
|
||||
_activePeers = new ArrayList(256);
|
||||
_nextPeer = 0;
|
||||
_builder = new PacketBuilder(ctx, transport);
|
||||
_alive = true;
|
||||
// _allowExcess = false;
|
||||
|
@ -47,9 +47,6 @@ class OutboundMessageState {
|
||||
public OutboundMessageState(I2PAppContext context) {
|
||||
_context = context;
|
||||
_log = _context.logManager().getLog(OutboundMessageState.class);
|
||||
_pushCount = 0;
|
||||
_maxSends = 0;
|
||||
// _nextSendFragment = 0;
|
||||
}
|
||||
|
||||
public boolean initialize(OutNetMessage msg) {
|
||||
|
@ -246,36 +246,19 @@ class PeerState {
|
||||
_context = ctx;
|
||||
_log = ctx.logManager().getLog(PeerState.class);
|
||||
_transport = transport;
|
||||
_remotePeer = null;
|
||||
_currentMACKey = null;
|
||||
_currentCipherKey = null;
|
||||
_nextMACKey = null;
|
||||
_nextCipherKey = null;
|
||||
_nextKeyingMaterial = null;
|
||||
_rekeyBeganLocally = false;
|
||||
_keyEstablishedTime = -1;
|
||||
_clockSkew = 0;
|
||||
_currentReceiveSecond = -1;
|
||||
_lastSendTime = -1;
|
||||
_lastReceiveTime = -1;
|
||||
_currentACKs = new ConcurrentHashSet();
|
||||
_currentACKsResend = new LinkedBlockingQueue();
|
||||
_currentSecondECNReceived = false;
|
||||
_remoteWantsPreviousACKs = false;
|
||||
_sendWindowBytes = DEFAULT_SEND_WINDOW_BYTES;
|
||||
_sendWindowBytesRemaining = DEFAULT_SEND_WINDOW_BYTES;
|
||||
_slowStartThreshold = MAX_SEND_WINDOW_BYTES/2;
|
||||
_lastSendRefill = _context.clock().now();
|
||||
_receivePeriodBegin = _lastSendRefill;
|
||||
_sendBps = 0;
|
||||
_sendBytes = 0;
|
||||
_receiveBps = 0;
|
||||
_lastCongestionOccurred = -1;
|
||||
_remoteIP = null;
|
||||
_remotePort = -1;
|
||||
_remoteRequiresIntroduction = false;
|
||||
_weRelayToThemAs = 0;
|
||||
_theyRelayToUsAs = 0;
|
||||
_mtu = getDefaultMTU();
|
||||
_mtuReceive = _mtu;
|
||||
_mtuLastChecked = -1;
|
||||
@ -283,19 +266,8 @@ class PeerState {
|
||||
_rto = MIN_RTO;
|
||||
_rtt = _rto/2;
|
||||
_rttDeviation = _rtt;
|
||||
_messagesReceived = 0;
|
||||
_messagesSent = 0;
|
||||
_packetsTransmitted = 0;
|
||||
_packetsRetransmitted = 0;
|
||||
_packetRetransmissionRate = 0;
|
||||
_retransmissionPeriodStart = 0;
|
||||
_packetsReceived = 0;
|
||||
_packetsReceivedDuplicate = 0;
|
||||
_inboundMessages = new HashMap(8);
|
||||
_outboundMessages = new ArrayList(32);
|
||||
_dead = false;
|
||||
_isInbound = false;
|
||||
_lastIntroducerTime = 0;
|
||||
_context.statManager().createRateStat("udp.congestionOccurred", "How large the cwin was when congestion occurred (duration == sendBps)", "udp", UDPTransport.RATES);
|
||||
_context.statManager().createRateStat("udp.congestedRTO", "retransmission timeout after congestion (duration == rtt dev)", "udp", UDPTransport.RATES);
|
||||
_context.statManager().createRateStat("udp.sendACKPartial", "Number of partial ACKs sent (duration == number of full ACKs in that ack packet)", "udp", UDPTransport.RATES);
|
||||
|
@ -118,8 +118,6 @@ class PeerTestManager {
|
||||
_activeTests = new ConcurrentHashMap();
|
||||
_recentTests = new LinkedBlockingQueue();
|
||||
_packetBuilder = new PacketBuilder(context, transport);
|
||||
_currentTest = null;
|
||||
_currentTestComplete = false;
|
||||
_context.statManager().createRateStat("udp.statusKnownCharlie", "How often the bob we pick passes us to a charlie we already have a session with?", "udp", UDPTransport.RATES);
|
||||
_context.statManager().createRateStat("udp.receiveTestReply", "How often we get a reply to our peer test?", "udp", UDPTransport.RATES);
|
||||
_context.statManager().createRateStat("udp.receiveTest", "How often we get a packet requesting us to participate in a peer test?", "udp", UDPTransport.RATES);
|
||||
|
@ -76,7 +76,6 @@ class TimedWeightedPriorityMessageQueue implements MessageQueue, OutboundMessage
|
||||
}
|
||||
_alive = true;
|
||||
_nextLock = this;
|
||||
_nextQueue = 0;
|
||||
_chokedPeers = Collections.synchronizedSet(new HashSet(16));
|
||||
_listener = lsnr;
|
||||
_context.statManager().createRateStat("udp.timeToEntrance", "Message lifetime until it reaches the UDP system", "udp", UDPTransport.RATES);
|
||||
|
@ -177,7 +177,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
_peersByIdent = new ConcurrentHashMap(128);
|
||||
_peersByRemoteHost = new ConcurrentHashMap(128);
|
||||
_dropList = new ConcurrentHashSet(2);
|
||||
_endpoint = null;
|
||||
|
||||
// See comments in DQAT.java
|
||||
if (USE_PRIORITY) {
|
||||
|
Reference in New Issue
Block a user