Similar to: Execution time out on test #JV8
My program times out in the CodeCrafter runner, even though it says downloading from multiple peers at once is optional.
Currently my code is synchronous, as it waits for a piece to be downloaded before downloading the next one. So, is it in fact mandatory to download blocks/pieces concurrently for this task?
My execution logs:
remote: [tester::#JV8] Running tests for Stage #JV8 (Download the whole file)
remote: [tester::#JV8] Running ./your_bittorrent.sh download -o /tmp/torrents1341413538/codercat.gif /tmp/torrents1341413538/codercat.gif.torrent
remote: [your_program] Total number of pieces: 12
remote: [your_program] Peer ID: 2d524e302e302e302d89d20d086fea9fcedc2c9d
remote: [your_program] Waiting for bitfield message...
remote: [your_program] Received message with ID 5.
remote: [your_program] 🫸🏻 Waiting for unchoke message...
remote: [your_program] Received message with ID 1.
remote: [your_program] 📥 Received unchoke message.
remote: [your_program] Requesting block 1 of 16 with length 16384
remote: [your_program] Requesting block 2 of 16 with length 16384
remote: [your_program] Requesting block 3 of 16 with length 16384
remote: [your_program] Requesting block 4 of 16 with length 16384
remote: [your_program] Requesting block 5 of 16 with length 16384
remote: [your_program] Requesting block 6 of 16 with length 16384
remote: [your_program] Requesting block 7 of 16 with length 16384
remote: [your_program] Requesting block 8 of 16 with length 16384
remote: [your_program] Requesting block 9 of 16 with length 16384
remote: [your_program] Requesting block 10 of 16 with length 16384
remote: [your_program] Requesting block 11 of 16 with length 16384
remote: [your_program] Requesting block 12 of 16 with length 16384
remote: [your_program] Requesting block 13 of 16 with length 16384
remote: [your_program] Requesting block 14 of 16 with length 16384
remote: [your_program] Requesting block 15 of 16 with length 16384
remote: [your_program] Requesting block 16 of 16 with length 16384
remote: [your_program] Peer ID: 2d524e302e302e302d89d20d086fea9fcedc2c9d
remote: [your_program] Waiting for bitfield message...
remote: [your_program] Received message with ID 5.
remote: [your_program] 🫸🏻 Waiting for unchoke message...
remote: [your_program] Received message with ID 1.
remote: [your_program] 📥 Received unchoke message.
remote: [your_program] Requesting block 1 of 16 with length 16384
remote: [your_program] Requesting block 2 of 16 with length 16384
remote: [your_program] Requesting block 3 of 16 with length 16384
remote: [your_program] Requesting block 4 of 16 with length 16384
remote: [your_program] Requesting block 5 of 16 with length 16384
remote: [your_program] Requesting block 6 of 16 with length 16384
remote: [your_program] Requesting block 7 of 16 with length 16384
remote: [your_program] Requesting block 8 of 16 with length 16384
remote: [your_program] Requesting block 9 of 16 with length 16384
remote: [your_program] Requesting block 10 of 16 with length 16384
remote: [your_program] Requesting block 11 of 16 with length 16384
remote: [your_program] Requesting block 12 of 16 with length 16384
remote: [your_program] Requesting block 13 of 16 with length 16384
remote: [your_program] Requesting block 14 of 16 with length 16384
remote: [your_program] Requesting block 15 of 16 with length 16384
remote: [your_program] Requesting block 16 of 16 with length 16384
remote: [your_program] Peer ID: 2d524e302e302e302d89d20d086fea9fcedc2c9d
remote: [your_program] Waiting for bitfield message...
remote: [your_program] Received message with ID 5.
remote: [your_program] 🫸🏻 Waiting for unchoke message...
remote: [your_program] Received message with ID 1.
remote: [your_program] 📥 Received unchoke message.
remote: [your_program] Requesting block 1 of 16 with length 16384
remote: [your_program] Requesting block 2 of 16 with length 16384
remote: [your_program] Requesting block 3 of 16 with length 16384
remote: [your_program] Requesting block 4 of 16 with length 16384
remote: [your_program] Requesting block 5 of 16 with length 16384
remote: [your_program] Requesting block 6 of 16 with length 16384
remote: [your_program] Requesting block 7 of 16 with length 16384
remote: [your_program] Requesting block 8 of 16 with length 16384
remote: [your_program] Requesting block 9 of 16 with length 16384
remote: [your_program] Requesting block 10 of 16 with length 16384
remote: [your_program] Requesting block 11 of 16 with length 16384
remote: [your_program] Requesting block 12 of 16 with length 16384
remote: [your_program] Requesting block 13 of 16 with length 16384
remote: [your_program] Requesting block 14 of 16 with length 16384
remote: [your_program] Requesting block 15 of 16 with length 16384
remote: [your_program] Requesting block 16 of 16 with length 16384
remote: [tester::#JV8] execution timed out
remote: [tester::#JV8] Test failed
My code: GitHub - merc1er/bittorrent-python