This adds a cache to house mix messages that have recently been removed from the mixpool. It makes use of the new container/lru module to handle automatic expiration of entries and maximum entry limiting.
The rationale for this change is that it is considered misbehavior to advertise a mix message and then claim it is not found when the corresponding request arrives. Maintaining a separate cache of mix messages recently removed from the mixpool for a short period of time significantly increases the probability they are available to serve when a request for the advertisement arrives independent of the current status of the mixpool.
This requires #3360 and is rebased on #3362.
This adds a cache to house mix messages that have recently been removed from the mixpool. It makes use of the new
container/lru
module to handle automatic expiration of entries and maximum entry limiting.The rationale for this change is that it is considered misbehavior to advertise a mix message and then claim it is not found when the corresponding request arrives. Maintaining a separate cache of mix messages recently removed from the mixpool for a short period of time significantly increases the probability they are available to serve when a request for the advertisement arrives independent of the current status of the mixpool.