Would be better if the relay_get returned a Result<Option<SignedPacket>>. An error should signal a networking error, no entry in the dht should return None.
It's also not clear why relay_put requires an owned packet. Since it gets serialized, a reference should be enough.
Would be better if the relay_get returned a
Result<Option<SignedPacket>>
. An error should signal a networking error, no entry in the dht should returnNone
.It's also not clear why relay_put requires an owned packet. Since it gets serialized, a reference should be enough.