Changeset c8b7e82 for router


Ignore:
Timestamp:
Feb 26, 2019 5:38:34 PM (14 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
302adc2
Parents:
cf1c0cb3
Message:

Console: Handle zero SSU RTT on /peers (ticket #2443)
PeerState? minor cleanups

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterVersion.java

    rcf1c0cb3 rc8b7e82  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 10;
     21    public final static long BUILD = 11;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/udp/PeerState.java

    rcf1c0cb3 rc8b7e82  
    12381238            // first measurement
    12391239            _rtt = (int) lifetime;
    1240             _rttDeviation = (int)(lifetime / 2);
     1240            _rttDeviation = _rtt /  2;
    12411241        } else {
    12421242            // the rttDev calculation matches that recommended in RFC 2988 (beta = 1/4)
    1243             _rttDeviation = (int)( 0.75*_rttDeviation + 0.25*Math.abs(lifetime-_rtt) );
    1244        
    1245             float scale = RTT_DAMPENING;
    1246        
    1247             _rtt = (int)(_rtt*(1.0f-scale) + (scale)*lifetime);
     1243            _rttDeviation = (int)((0.75 * _rttDeviation) + (0.25 * Math.abs(lifetime - _rtt)));
     1244            _rtt = (int)((_rtt * (1.0f - RTT_DAMPENING)) + (RTT_DAMPENING * lifetime));
    12481245        }
    12491246        // K = 4
Note: See TracChangeset for help on using the changeset viewer.