track remote have and bitset

This commit is contained in:
2024-06-25 21:09:46 +02:00
parent 0b4041db7e
commit 27cade4dfe
3 changed files with 177 additions and 6 deletions

View File

@@ -33,7 +33,8 @@ namespace Components {
};
struct FT1ChunkSHA1Cache {
//std::vector<bool> have_chunk;
// TODO: extract have_chunk, have_all and have_count to generic comp
// have_chunk is the size of info.chunks.size(), or empty if have_all
// keep in mind bitset rounds up to 8s
BitSet have_chunk{0};
@@ -56,6 +57,14 @@ namespace Components {
entt::dense_set<Contact3> participants;
};
struct RemoteHave {
struct Entry {
bool have_all {false};
BitSet have;
};
entt::dense_map<Contact3, Entry> others;
};
struct ReRequestInfoTimer {
float timer {0.f};
};