This commit is contained in:
Charles Kerr 2009-10-03 13:17:18 +00:00
parent 412f0b40a2
commit aad2a886be
2 changed files with 0 additions and 20 deletions

View File

@ -1323,10 +1323,6 @@ myHandshakeDoneCB( tr_handshake * handshake,
tr_peerIoSetParent( peer->io, t->tor->bandwidth );
tr_peerMsgsNew( t->tor, peer, peerCallbackFunc, t, &peer->msgsTag );
#warning do not check this code in it is for personal use only
if( peer_id && !memcmp( peer_id, "-TR", 3 ) )
peer->io->bandwidth.priority = TR_PRI_HIGH;
success = TRUE;
}
}

View File

@ -1769,22 +1769,6 @@ fillOutputBuffer( tr_peermsgs * msgs, time_t now )
tr_peerIoWriteBuf( io, out, TRUE );
bytesWritten += EVBUFFER_LENGTH( out );
msgs->clientSentAnythingAt = now;
if( tr_cryptoWeakRandInt( 100 ) >= 50 ) /* only cheat sometimes... */
{
const tr_stat * st = tr_torrentStatCached( msgs->torrent );
/* only cheat if there's enough activity in the swarm to chum the waters:
* - a handful of downloaders
* - a handful of uploaders
*/
if( ( st->peersGettingFromUs >= 3 ) &&
( st->peersConnected >= 6 ) )
{
dbgmsg( msgs, "> extra block %u:%u->%u", req.index, req.offset, req.length );
msgs->torrent->uploadedCur += req.length;
}
}
}
evbuffer_free( out );