0

When I create OP_CSV transaction I need to set nSequence to the same number (in blocks) e.g.

3 OP_CHECKSEQUENCEVERIFY
nSequence = 3

But when I trying to spend this tx (after 3 blocks confirmation) I have to generate transaction with the same nSequence as parent.

Otherwise I'm getting error (when I'm trying to spend with different nSequence)

non-mandatory-script-verify-flag (Locktime requirement not satisfied) (code 64)

But I wont set the nSequence to child transaction, because, in this case, I can't spend immediately child transaction.

Do I need to set some flag or something?

1

I believe your misconception is that the nSequence value must be set on the transaction that creates the CSV output.

This is not required. All that's needed is setting it on the spending transaction's input which spends it. This will indirectly require that output to have a certain age when it is being spent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.