[ ] Let's avoid querying the per_relay_parent map again and again if we can pass it as a param to the function. it saves us some superfluous error handling that is already handled a level above. _Originally posted by @alindima in https://github.com/paritytech/polkadot-sdk/pull/4880#discussion_r1860666690_
For further refactoring:
Collations
fetching_from really should be a part of the CollationStatus::Fetching() status variant Originally posted by @alindima in https://github.com/paritytech/polkadot-sdk/pull/4880/files#r1860614933unfulfilled_claim_queue_entries
and the code inensure_seconding_limit_is_respected
). Instead keepClaimQueueState
for all paths inState
, keep them up to date by marking seconded and pending canddiates accordingly, and have it ready for use when needed. - https://github.com/paritytech/polkadot-sdk/pull/4880/files#r1861728429 and https://github.com/paritytech/polkadot-sdk/pull/4880/files#r1861727967