torrust-tracker icon indicating copy to clipboard operation
torrust-tracker copied to clipboard

Extract duplicate implementation of `InfoHash` struct

Open josecelano opened this issue 2 years ago • 1 comments

Relates to:

  • https://github.com/torrust/torrust-index-backend/issues/251
  • https://github.com/torrust/torrust-tracker/issues/753

We are duplicating code for:

pub struct InfoHash(pub [u8; 20]);
  • https://github.com/torrust/torrust-tracker/blob/develop/src/shared/bit_torrent/info_hash.rs#L136-L167
  • https://github.com/torrust/torrust-index-backend/blob/develop/src/models/info_hash.rs#L136-L167

We should extract a common BitTorrent protocol crate for both the Tracker and the Index Backend.

josecelano avatar Aug 04 '23 15:08 josecelano

Hi @da2ce7 I would like to do this. Which package could we include this mod in? bittorrent?

josecelano avatar Jun 19 '24 09:06 josecelano