fn compute_priority(attr: &EcdsaMessageAttribute, cached_finalized_height: Height) -> Priority {
    match attr {
        EcdsaMessageAttribute::EcdsaSignedDealing(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
        EcdsaMessageAttribute::EcdsaDealingSupport(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
        EcdsaMessageAttribute::EcdsaSigShare(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
    }
}
// TODO:
// 1. We don't drop anything right now. Once the purging part settles down
// (https://dfinity.atlassian.net/browse/CON-624), we can start dropping
// unwanted adverts
// 2. The current filtering is light weight, purely based on the finalized
// height (cached when the priority function is periodically computed).
// We could potentially do more filtering (e.g) drop adverts for transcripts
// we are not interested in, and use the latest state of the artifact pools.
// But this would require more processing per call to priority function, and
// cause extra lock contention for the main processing paths.
1. We don't drop anything right now. Once the purging part settles down
, we can start dropping
unwanted adverts
2. The current filtering is light weight, purely based on the finalized
height (cached when the priority function is periodically computed).
We could potentially do more filtering  drop adverts for transcripts
we are not interested in, and use the latest state of the artifact pools.
But this would require more processing per call to priority function, and
cause extra lock contention for the main processing paths.
1 . We don ' t drop anything right now . Once the purging part settles down we can start dropping unwanted adverts 2 . The current filtering is light weight purely based on the finalized height ( cached when the priority function is periodically computed ) . We could potentially do more filtering drop adverts for transcripts we are not interested in and use the latest state of the artifact pools . But this would require more processing per call to priority function and cause extra lock contention for the main processing paths .
fn compute_priority(attr: &EcdsaMessageAttribute, cached_finalized_height: Height) -> Priority {
    match attr {
        EcdsaMessageAttribute::EcdsaSignedDealing(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
        EcdsaMessageAttribute::EcdsaDealingSupport(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
        EcdsaMessageAttribute::EcdsaSigShare(height) => {
            if *height < cached_finalized_height + Height::from(LOOK_AHEAD) {
                Priority::Fetch
            } else {
                Priority::Stash
            }
        }
    }
}
fn compute_priority ( attr : & EcdsaMessageAttribute , cached_finalized_height : Height ) -> Priority { match attr { EcdsaMessageAttribute :: EcdsaSignedDealing ( height ) => { if * height < cached_finalized_height + Height :: from ( LOOK_AHEAD ) { Priority :: Fetch } else { Priority :: Stash } } EcdsaMessageAttribute :: EcdsaDealingSupport ( height ) => { if * height < cached_finalized_height + Height :: from ( LOOK_AHEAD ) { Priority :: Fetch } else { Priority :: Stash } } EcdsaMessageAttribute :: EcdsaSigShare ( height ) => { if * height < cached_finalized_height + Height :: from ( LOOK_AHEAD ) { Priority :: Fetch } else { Priority :: Stash } } } }
TODO:
1.
TODO : 1 .
attr
&EcdsaMessageAttribute
cached_finalized_height
Height
attr
&EcdsaMessageAttribute
cached_finalized_height
Height