[Rust] [#ND2] Posible bug on test files or I'm missing something?

Hi! I’m in stage #ND2 and I’m having this problem:

When I run the test, and when it uses the file /tmp/torrents3424351532/piece-9, i get this error:

index out of bounds: the len is 3 but the index is 9

But I don’t know if the problem is with the code, because in Stage #FI9 (Discover peers) I get more than 3 peers:

Or maybe there is something I’m missing? :thinking:

Thanks!

(Added later)

I dbg! one test and this what I get, the first one passes (I believe) but the second does not because I only get 3 peers and is trying to get the on in the Index 3, that does not exist:

Hi @ragranados, the index argument should be used to specify a piece rather than a peer.

1 Like

Hi @andy1li!

Yeah, that was the problem :sweat_smile:

Thanks a lot for your response!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.