Skip to main content

exceeds_spending_limit

Function exceeds_spending_limit 

Source
pub(crate) fn exceeds_spending_limit(
    provider: &mut impl StateProvider,
    subject: &KeychainSubject,
    fee_token_cost: U256,
    current_timestamp: u64,
    spec: TempoHardfork,
) -> bool
Expand description

Checks whether a pending keychain tx exceeds its effective remaining spending limit.

Re-reads the current limit from state for the tx’s (account, key_id, fee_token) combo, including any T3 periodic-limit rollover at current_timestamp. Returns true if the tx’s fee cost exceeds the effective remaining limit, meaning it should be evicted.