Objective: Make the contract for AddTimeData testable.
The procedure AddTimeData is stateful, so any testing beyond trivialities requires some modification in the code:
- Separation between orchestration (lock/unlock) and algorithm
- Pushing static (stateful) variables out of the procedure body
- Applied clang-format-diff.py
Additionally: wallet_tests.cpp contains errors -> Tests for ComputeTimeSmart falsely assumed that time offset is zero