I just want to point out that the behaviour expected by testcase TestGossiper_Topo2_5Nodes_Private_Close disagrees with the homework specification.
So the homework specification says:
Every node on the forwarding path (including the source peer) will first decrement this value and either forward the message, or discard the message if the value reaches 0 before the message reaches the destination.
Of course, this means that private messages with hop-limit 1 will be discarded at the source peer. But in the testcase, we are required to send a message with hop-limit 1 to a neighbour of the source peer. I think it is a typo, the homework specification should say "excluding the source peer", so it will agree with the testcase.