block - Erlang bittorrent pieces request -


i'm working on bittorrent client in erlang. i'm trying request blocks , build , verify piece downloaded blocks. works long not last piece (which of different size other pieces). seems if last piece downloaded can't seem match hash of against hash retrieved torrent-file. guess i'm not asking solution here, rather if there's in particular should keep in mind when comes hash of last piece. there?

no, there not. last piece sha1-hashed others, albeit smaller.

my guess have bug around handling last block , or piece correctly. 1 way, if glancing @ code fails, test known torrent , compare received pieces should have received. start printing out last block when , compare file.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -