<p>I believe your misconception is that the nSequence value must be set on the transaction that <em>creates</em> the CSV output.</p>

<p>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.</p>

CC BY-SA 4.0
2018-11-20T16:29:39.950Z
2018-11-20T16:29:39.950Z
Pieter Wuille
<p>When I create OP_CSV  transaction I need to set nSequence to the same number (in blocks) 
e.g. </p>

<pre><code>3 OP_CHECKSEQUENCEVERIFY
nSequence = 3
</code></pre>

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

<p>Otherwise I'm getting error (when I'm trying to spend with different nSequence)</p>

<pre><code>non-mandatory-script-verify-flag (Locktime requirement not satisfied) (code 64)
</code></pre>

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

<p>Do I need to set some flag or something?</p>

<bitcoind><script><raw-transaction>
nSequence win OP_CSV in child tx must be equal to nSeq parent tx?
Andrew
# nSequence win OP_CSV in child tx must be equal to nSeq parent tx?

(Asked by: username_0 on 2018-11-19)

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?

**Tags:** bitcoind, script, raw-transaction


---

## 1 answers

### Answer by username_1 on 2018-11-20. Score: 1 | Accepted answer

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.


---

