This PR adds tests for the UNIX timestamp portion of BIP65. I don’t believe this is currently tested in the python test suite (not sure about c++).
Apologies if this is actually tested somewhere else and this is duplicate.
There is some interesting interplay between median-time-past consensus rules (BIP113) and lock times. This PR attempts to test that logic as well - for instance I don’t believe it is possible to spend a UTXO that has a output script with locktime 0xffff_ffff
or 0xffff_fffe
Unfortunately it does seem like these tests aren’t necessarily always testing OP_CLTV logic as median-time-past ends up being the reason blocks cannot be mined for edge cases.