receiving count for peer
This commit is contained in:
parent
33560f8f8a
commit
edf58b70f5
@ -120,3 +120,12 @@ size_t ReceivingTransfers::size(void) const {
|
||||
return count;
|
||||
}
|
||||
|
||||
size_t ReceivingTransfers::sizePeer(uint64_t combined_id) const {
|
||||
auto it = _data.find(combined_id);
|
||||
if (it == _data.end()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return it->second.size();
|
||||
}
|
||||
|
||||
|
@ -59,5 +59,6 @@ struct ReceivingTransfers {
|
||||
void removePeerTransfer(uint64_t combined_id, uint8_t transfer_id);
|
||||
|
||||
size_t size(void) const;
|
||||
size_t sizePeer(uint64_t combined_id) const;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user