Closed dimxy closed 1 year ago
Few useful links about IsFinalTx
, CLTV
, nSequence
:
Wrote a test for IsFinalTx
for komodod
, for now it exists only in KomodoOcean repo in patch-test-isfinaltx
branch, if needed we can do PR in komodod
repo. All tests made in one file - test_isfinaltx.cpp
. Same behavior we should have in Zebra.
It looks like the changes are ready and can be found in the patch-isfinaltx branch. We will no longer be using lock_time_has_passed
/ tx.lock_time()
because this method is not clear as it returns a value based on certain conditions. Instead, we will be using a new function called is_final_tx_komodo
, which is a step-by-step replication of the IsFinalTx
function from komodod
and uses the previously introduced tx.raw_lock_time()
to read the "raw" nLockTime
field. All possible cases have been covered in the tests.
See komodo IsFinalTx with komodo_hardfork_active() function use (which is actually s1 hardfork)