mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
Remove tr_generateAllowedSet declaration (#4029)
This commit is contained in:
parent
798e873b87
commit
14f2698cdc
2 changed files with 0 additions and 31 deletions
|
@ -80,11 +80,4 @@ tr_peerMsgs* tr_peerMsgsNew(
|
|||
tr_peer_callback callback,
|
||||
void* callback_data);
|
||||
|
||||
size_t tr_generateAllowedSet(
|
||||
tr_piece_index_t* setmePieces,
|
||||
size_t desiredSetSize,
|
||||
size_t pieceCount,
|
||||
uint8_t const* infohash,
|
||||
struct tr_address const* addr);
|
||||
|
||||
/* @} */
|
||||
|
|
|
@ -12,28 +12,4 @@
|
|||
|
||||
TEST(PeerMsgs, placeholder)
|
||||
{
|
||||
#if 0
|
||||
|
||||
auto infohash = tr_sha1_digest_t{};
|
||||
tr_piece_index_t pieceCount = 1313;
|
||||
size_t numwant;
|
||||
size_t numgot;
|
||||
tr_piece_index_t pieces[] = { 1059, 431, 808, 1217, 287, 376, 1188, 353, 508 };
|
||||
tr_piece_index_t buf[16];
|
||||
|
||||
memset(std::data(infohash), 0xaa, std::size(infohash));
|
||||
|
||||
auto const addr = tr_address::fromString("80.4.4.200");
|
||||
|
||||
numwant = 7;
|
||||
numgot = tr_generateAllowedSet(buf, numwant, pieceCount, infohash, &addr);
|
||||
check_uint(numgot, ==, numwant);
|
||||
check_mem(buf, ==, pieces, numgot);
|
||||
|
||||
numwant = 9;
|
||||
numgot = tr_generateAllowedSet(buf, numwant, pieceCount, infohash, &addr);
|
||||
check_uint(numgot, ==, numwant);
|
||||
check_mem(buf, ==, pieces, numgot);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue