replaced seed cycles with seed rank

This commit is contained in:
Arvid Norberg
2008-05-06 18:03:41 +00:00
parent 4df46a6e5e
commit 9429ca4b1f
5 changed files with 70 additions and 30 deletions

View File

@@ -151,8 +151,7 @@ namespace libtorrent
void files_checked();
void start_checking();
float seed_cycles(session_settings const& s) const;
int seed_cycles_int(session_settings const& s) const { return int(seed_cycles(s)); }
int seed_rank(session_settings const& s) const;
storage_mode_t storage_mode() const { return m_storage_mode; }
// this will flag the torrent as aborted. The main
@@ -876,6 +875,12 @@ namespace libtorrent
// stored in resume data
size_type m_total_uploaded;
size_type m_total_downloaded;
// if this torrent is running, this was the time
// when it was started. This is used to have a
// bias towards keeping seeding torrents that
// recently was started, to avoid oscillation
ptime m_started;
};
inline ptime torrent::next_announce() const

View File

@@ -118,7 +118,7 @@ namespace libtorrent
, all_time_download(0)
, active_time(0)
, seeding_time(0)
, seed_cycles(0.f)
, seed_rank(0)
{}
enum state_t
@@ -257,7 +257,8 @@ namespace libtorrent
int active_time;
int seeding_time;
float seed_cycles;
// higher value means more important to seed
int seed_rank;
};
struct TORRENT_EXPORT block_info