{"action":"created","issue":{"url":"https://api.github.com/repos/Tribler/tribler/issues/1928","repository_url":"https://api.github.com/repos/Tribler/tribler","labels_url":"https://api.github.com/repos/Tribler/tribler/issues/1928/labels{/name}","comments_url":"https://api.github.com/repos/Tribler/tribler/issues/1928/comments","events_url":"https://api.github.com/repos/Tribler/tribler/issues/1928/events","html_url":"https://github.com/Tribler/tribler/issues/1928","id":132229738,"number":1928,"title":"Tests are defining torrent piece length not as a power of two","user":{"login":"devos50","id":1707075,"avatar_url":"https://avatars.githubusercontent.com/u/1707075?v=3","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-08T19:03:14Z","updated_at":"2016-02-09T09:42:53Z","closed_at":null,"body":"When running the tests on OS X using libtorrent 1.0.8 (with assertions enabled and debug symbols), I get an assertion: https://jenkins.tribler.org/job/Test_macmini_unittests/68/artifact/output/test_runners_output/1.err/*view*/. When running the `test_vod.py` test suite, the problem is that the piece length is not defined as a power of two but instead, has a value of 10.\r\n\r\nAccording to the BitTorrent specifications, the piece size of a torrent is usually a power of two (see https://wiki.theory.org/BitTorrentSpecification - ctrl+f on piece size). Even `libtorrent` has an assertion built-in to test for a power-of-two block size: https://github.com/arvidn/libtorrent/blob/master/src/torrent.cpp#L125.\r\n\r\nWhile these tests will probably pass when I recompile libtorrent without assertions enabled, I feel we should fix this by changing the piece size to a power of two (for instance, 16). Any suggestions on this one?"},"comment":{"url":"https://api.github.com/repos/Tribler/tribler/issues/comments/181784801","html_url":"https://github.com/Tribler/tribler/issues/1928#issuecomment-181784801","issue_url":"https://api.github.com/repos/Tribler/tribler/issues/1928","id":181784801,"user":{"login":"whirm","id":529494,"avatar_url":"https://avatars.githubusercontent.com/u/529494?v=3","gravatar_id":"","url":"https://api.github.com/users/whirm","html_url":"https://github.com/whirm","followers_url":"https://api.github.com/users/whirm/followers","following_url":"https://api.github.com/users/whirm/following{/other_user}","gists_url":"https://api.github.com/users/whirm/gists{/gist_id}","starred_url":"https://api.github.com/users/whirm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whirm/subscriptions","organizations_url":"https://api.github.com/users/whirm/orgs","repos_url":"https://api.github.com/users/whirm/repos","events_url":"https://api.github.com/users/whirm/events{/privacy}","received_events_url":"https://api.github.com/users/whirm/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T09:42:53Z","updated_at":"2016-02-09T09:42:53Z","body":"Fine by me, go ahead"}}