added seed mode support (lazy hash checking)
This commit is contained in:
@@ -44,7 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
using boost::filesystem::remove_all;
|
||||
using boost::filesystem::exists;
|
||||
|
||||
void test_swarm(bool super_seeding = false, bool strict = false)
|
||||
void test_swarm(bool super_seeding = false, bool strict = false, bool seed_mode = false)
|
||||
{
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -92,9 +92,11 @@ void test_swarm(bool super_seeding = false, bool strict = false)
|
||||
torrent_handle tor2;
|
||||
torrent_handle tor3;
|
||||
|
||||
add_torrent_params p;
|
||||
p.seed_mode = seed_mode;
|
||||
// test using piece sizes smaller than 16kB
|
||||
boost::tie(tor1, tor2, tor3) = setup_transfer(&ses1, &ses2, &ses3, true
|
||||
, false, true, "_swarm", 8 * 1024, 0, super_seeding);
|
||||
, false, true, "_swarm", 8 * 1024, 0, super_seeding, &p);
|
||||
|
||||
float sum_dl_rate2 = 0.f;
|
||||
float sum_dl_rate3 = 0.f;
|
||||
@@ -201,6 +203,9 @@ int test_main()
|
||||
using namespace libtorrent;
|
||||
using namespace boost::filesystem;
|
||||
|
||||
// with seed mode
|
||||
test_swarm(false, false, true);
|
||||
|
||||
test_swarm();
|
||||
|
||||
// with super seeding
|
||||
|
Reference in New Issue
Block a user