Yeah I mean I’m still trying to understand the logic of the nLocktime + nSequence what problem it solves, given that putting a uniqueness marker in the form of the block height is enough to avoid future coinbase txid collision. Like I said, I’ll re-check IsFinalTx for my own sake.
I think I’m getting the rational of the purpose of this pair of nLocktime + nSequence by requesting at least one input to be non-final, you ensure that the nLocktime must have been enforced, therefore that a coinbase tx in the far past with a nLocktime=block_height_ABC couldn’t collide with coinbase tx at block_height_ABC due to the nSequence diff. To this, one could check that the historical blockchain does not contain coinbase transaction with nLocktime == height_in_the_future, but even it would be the case today (and I think there are some comments on this on the Delving Bitcoin thread), there would be not guarantee that a (miner) script kiddie falsify this assumption until the Consensus Cleanup got activated.
Design alternative would be to add a unique structure in the coinbase transaction (e.g with the commitment structure allowed by BIP141), but effectively it would be come with an artificial inflation size of the coinbase transaction (and I’m not even talking of the p2p changes that would comes as a necessity with that). Musing, if there is a more cleaner solution.
Generally, Lamport’s “State the Problem Before Describing the Solution” (https://lamport.azurewebsites.net/pubs/state-the-problem.pdf) is a good essay on how to explain clearly a problem, before coming with the solution.