setmocktime
Setmocktime is a testing utility used in Bitcoin Core to override the node’s notion of time during tests. It provides a deterministic way to simulate time-dependent behavior in unit and functional tests by letting the test framework set a mock, or fake, current time.
In the codebase, time sources are centralized. When mock time is enabled, time-related functions return the
Usage typically occurs in test or regtest environments. The mock time can be advanced by the test
Limitations and scope: setmocktime is intended for development and testing, not production use. It is primarily