Skip to content
Unverified Commit 13a474ce authored by Dónal Murray's avatar Dónal Murray Committed by GitHub
Browse files

[pallet_broker] Remove leases that have already expired in rotate_sale (#3213)

Leases can be force set, but since `Leases` is a `StorageValue`, if a
lease misses its sale rotation in which it should expire, it can never
be cleared.

This can happen if a lease is added with an `until` timeslice that lies
in a region whose sale has already started or has passed, even if the
timeslice itself hasn't passed.

This solves that issue in a minimal way, with all expired leases being
cleaned up in each sale rotation, not just the ones that are expiring in
the coming region.

TODO:
- [x] Write test
parent 9e6298e7
Pipeline #442815 failed with stages
in 39 minutes and 54 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment