ethereum / trin

An Ethereum portal client: a json-rpc server with nearly instant sync, and low CPU & storage usage
347 stars 105 forks source link

refactor: make `stop_process_timer` return duration #1306

Closed morph-dev closed 1 day ago

morph-dev commented 1 month ago

What was wrong?

The StorageMetricsReporter doesn't return elapsed duration when stop_process_timer is called, which can be useful in some situations.

This is a followup from #1295.

How was it fixed?

Make stop_process_timer return elapsed duration and use it to simplify the logic for updating pruning strategy.

To-Do