main.cpp I couldn't completely understand the purpose of a double barrier coded as if-statements:
I'm referring to ...
What is the idea behind checking if an inventory is known to the target peer twice?
I'm aware that
if (pto->setInventoryKnown.count(inv)) only checks if entry is known to target peer and
if (pto->setInventoryKnown.insert(inv).second) inserts the inventory item after checking its uniqueness.
I mean couldn't one just use only one if-statement combining?