mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
156f2c6c49kernel: add `btck_set_mock_time` for testing time-dependent paths (stringintech) Pull request description: Some kernel paths read the current time (e.g. header validation's future-time check, and the `btck_SynchronizationState` carried by `btck_NotifyBlockTip` / `btck_NotifyHeaderTip` callbacks), which makes them awkward to exercise deterministically in tests. This PR exposes `btck_set_mock_time` as a wrapper over the existing `SetMockTime`, mirroring what the node has via the `setmocktime` RPC. Prior IRC discussion: https://gnusha.org/bitcoin-kernel/2026-06-04.log ACKs for top commit: josibake: ACK156f2c6c49purpleKarrot: ACK156f2c6c49achow101: ACK156f2c6c49janb84: ACK156f2c6c49sedited: ACK156f2c6c49Tree-SHA512: da61faab0477fdc0de0e16420f228923d57733c42ef91b8947ef576e43abc8a1b78b9c1fa2ae60550ed5fd545f4d1c714dad0191d4442d4063112031ef7d1027