<p>The approach is correct. You don't have to use different private keys, you can use the same private key and same address for each of the control outputs.</p>

CC BY-SA 3.0
2014-03-09T06:20:26.410Z
2014-03-09T06:20:26.410Z
David Schwartz
<p>I would like to cancel a transaction I sent offline, and am looking for ways to prevent it from being accepted by the network.</p>

<p>Will the Bitcoin client prohibit the entire Tx if there is even on input that is already spent?</p>

<p>If the answer to that question is "yes", then what if I created "control addresses as follows:</p>

<ol>
<li>Generate 10,000 addresses and send each 0.0001 BTC </li>
<li>After N confirmations pass, create an offline transaction</li>
<li>Consume one of the balances in step 1 above in the offline Tx</li>
</ol>

<p>I suspect either one of the two scenarios will occur:</p>

<ol>
<li>User broadcasts offline Tx, and completes the Tx</li>
<li>I spend the balance of the "control address", and when the user tries to spend the offline tx, they are denied because one of the inputs it refers to has already been spent.</li>
<li>???</li>
</ol>

<p><strong>Question</strong></p>

<ul>
<li><p>Is this a correct approach to canceling offline transactions?  </p></li>
<li><p>What optimizations can be made?  I dislike having the overhead of having to sign each control input with a new private key each time.</p></li>
</ul>

<transactions><offline><locktime><off-chain>
Can I cancel an offline transaction with this approach? (opposite of nLocktime)
makerofthings7
# Can I cancel an offline transaction with this approach? (opposite of nLocktime)

(Asked by: username_0 on 2014-03-09)

I would like to cancel a transaction I sent offline, and am looking for ways to prevent it from being accepted by the network.

Will the Bitcoin client prohibit the entire Tx if there is even on input that is already spent?

If the answer to that question is "yes", then what if I created "control addresses as follows:

1. Generate 10,000 addresses and send each 0.0001 BTC
2. After N confirmations pass, create an offline transaction
3. Consume one of the balances in step 1 above in the offline Tx

I suspect either one of the two scenarios will occur:

1. User broadcasts offline Tx, and completes the Tx
2. I spend the balance of the "control address", and when the user tries to spend the offline tx, they are denied because one of the inputs it refers to has already been spent.
3. ???

**Question**

* Is this a correct approach to canceling offline transactions?
* What optimizations can be made? I dislike having the overhead of having to sign each control input with a new private key each time.

**Tags:** transactions, offline, locktime, off-chain


---

## 1 answers

### Answer by username_1 on 2014-03-09. Score: 1

The approach is correct. You don't have to use different private keys, you can use the same private key and same address for each of the control outputs.


---

