calculate_remaining_state_budget
Documentation for eth_defi.vault.rpc_scan_state.calculate_remaining_state_budget function.
- calculate_remaining_state_budget(boundary, committed_block, block_seconds, now)
Estimate time before unread state is evicted from the measured window.
A fresh capability observation does not reset the age of unscanned history. The estimate subtracts both head-to-committed-block lag and observation age.
- Parameters
boundary (dict) – Actual bounded provider-state observation.
committed_block (int) – Last durably committed chain reader block.
block_seconds (float) – Configured approximate block interval.
now (datetime.datetime) – Naive UTC scheduling time.
- Returns
Remaining seconds, possibly negative to expose an existing gap.
- Return type