mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
Remove tr_generateAllowedSet declaration (#4029)
This commit is contained in:
@@ -80,11 +80,4 @@ tr_peerMsgs* tr_peerMsgsNew(
|
|||||||
tr_peer_callback callback,
|
tr_peer_callback callback,
|
||||||
void* callback_data);
|
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)
|
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
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user