reth
reth copied to clipboard
fix(prune): respect timeout in account and storage history pruning
trafficstars
Fixes #19685 #19682
Added timeout checking to prune_history_indices function by passing PruneLimiter and checking is_time_limit_reached() in both the outer and inner loops. The function now returns a tuple (PrunedIndices, bool) to
indicate completion status, allowing the pruner to resume from checkpoint on the next run when interrupted by timeout.
This prevents the pruner from holding locks for 800ms-2s and ensures the configured timeout is respected as a hard limit rather than a soft limit.