1 suggestion
Optional improvements
[suggestion] · waitNext timeout test misses the NaN delay regression
By source inspection, the new waitNext assertions would still pass without NaN normalization, leaving the extra one-second wait untested.
Location: test/functional/interface_ipc_mining.py:346 (head).
Details and suggested fix
With the unchanged tip and feeThreshold = MAX_MONEY, the pre-PR implementation returns no template and emits no CreateNewBlock() log for both inputs. For NaN, std::min(now + tick, deadline) selects now + tick; after waiting one fee tick, the implementation skips template creation and exits because now < deadline is false. The negative timeout already expires immediately. Neither mining_wait_next_template nor assert_debug_log checks the call's duration, so removing only the new normalization would leave these assertions satisfied. Keep the assertions and add a check distinguishing a zero-timeout return from a fee-tick wait, for example through a unit-level controllable clock/wait seam. A functional timing check would need a bound below the one-second tick and slow-host handling; its reliability on loaded CI hosts has not been established.