I’ve gone by way of the various associated questions right here on stack change and clearly learn BIP68 and BIP112, however I nonetheless can’t appear to return to a transparent reply for the next query: what’s stopping a transaction that spends an output encumbered by OP_CSV from setting an arbitrarily excessive nSequence worth?
We could say the next situation:
txAhas a single output encumbered by10 OP_CSV, that means this output can solely be included in a transaction that’s mined 10 blocks aftertxAis confirmedtxBspends a single enter, which is the one output created fromtxA
The operate that performs the test is
template <class T>
bool GenericTransactionSignatureChecker<T>::CheckSequence(const CScriptNum& nSequence) const
{
// Relative lock occasions are supported by evaluating the handed
// in operand to the sequence variety of the enter.
const int64_t txToSequence = (int64_t)txTo->vin[nIn].nSequence;
...
omitted logic
...
// Now that we all know we're evaluating apples-to-apples, the
// comparability is a straightforward numeric one.
if (nSequenceMasked > txToSequenceMasked)
return false;
return true;
}
Why ought to the spending transaction not have the ability to set nSequence for the enter in such a method that txToSequenceMasked is all the time increased than nSequenceMasked? What precisely is stopping this? I really feel like I am lacking one thing apparent right here.
Hopefully my query is smart, thanks!











