swapd pending requests: add more semantics to indexing the pending request, while awaiting for the indexed event to dispatch the pending request
from PR #191:
The pending request has been ok so far, the issue is we index them using the ServiceId. I ensured it prints errors if it inserts a new pending request that removes another one that must not be removed, so if we deviate from the expected run, at least we log it and can fix it. So during the swap execution pending_requests are being inserted and removed at different states, and to reuse it has been ok, because its already empty when we try to use it again, while the protocol is unrolling. The issue is: its hard to make sure it behaves correctly on edge cases. And the way its currently done it makes it really hard to reason. I opened #190 for tracking this.
I think this can be closed now, right?