pub fn compute_resubmit_backoff_interval(
total_age: Duration,
base_interval_secs: i64,
max_interval_secs: i64,
) -> Option<Duration>Expand description
Computes the resubmit interval with exponential backoff based on total transaction age.
The interval doubles each time the total age doubles:
- age < base →
None(too early to resubmit) - age 1-2x base → interval = base (10s)
- age 2-4x base → interval = 2*base (20s)
- age 4-8x base → interval = 4*base (40s)
- …capped at
max_interval
Returns the backoff interval to compare against time since last submission (sent_at).