Changeset 5106


Ignore:
Timestamp:
Feb 25, 2008, 1:37:53 AM (14 years ago)
Author:
charles
Message:

(1.0x) tear out the "fast peer" code from refillPulse() altogether

Location:
branches/1.0x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0x/NEWS

    r5095 r5106  
    55   + Fix support for multitracker torrents
    66   + Improvements and bugfixes to "Verify Local Data"
     7   + Use less CPU
    78   + Updated UPnP code to miniupnpc-1.0
    89   + Fix two shutdown memory errors
  • branches/1.0x/libtransmission/peer-mgr.c

    r4855 r5106  
    559559    uint32_t piece;
    560560    uint32_t peerCount;
    561     uint32_t fastAllowed;
    562     uint32_t suggested;
    563561};
    564562
     
    576574    if( a->percentDone != b->percentDone )
    577575        return a->percentDone > b->percentDone ? -1 : 1;
    578    
    579     /* if one *might be* fastallowed to us, get it first...
    580      * I'm putting it on top so we prioritize those pieces at
    581      * startup, then we'll have them, and we'll be denied access
    582      * to them */
    583     if (a->fastAllowed != b->fastAllowed)
    584         return a->fastAllowed < b->fastAllowed ? -1 : 1;
    585    
    586     /* otherwise if one was suggested to us, get it */
    587     if (a->suggested != b->suggested)
    588         return a->suggested < b->suggested ? -1 : 1;
    589576   
    590577    /* otherwise if one has fewer peers, it goes first */
     
    644631            setme->priority = inf->pieces[piece].priority;
    645632            setme->peerCount = 0;
    646             setme->fastAllowed = 0;
    647633            setme->random = tr_rand( UINT16_MAX );
    648634            setme->percentDone = (int)( 100.0 * tr_cpPercentBlocksInPiece( tor->completion, piece ) );
     
    652638                if( peer->peerIsInterested && !peer->clientIsChoked && tr_bitfieldHas( peer->have, piece ) )
    653639                    ++setme->peerCount;
    654                 /* The fast peer extension doesn't force a peer to actually HAVE a fast-allowed piece,
    655                     but we're guaranteed to get the same pieces from different peers,
    656                     so we'll build a list and pray one actually have this one */
    657                 setme->fastAllowed = tr_peerMsgsIsPieceFastAllowed( peer->msgs, i );
    658                 /* Also, if someone SUGGESTed a piece to us, prioritize it over non-suggested others
    659                  */
    660                 setme->suggested   = tr_peerMsgsIsPieceSuggested( peer->msgs, i );
    661640            }
    662641        }
Note: See TracChangeset for help on using the changeset viewer.