<p>I found that in Electrum, you can create additional change addresses by using the console and typing:</p>
<pre><code>for i in range(0, 100): print(wallet.create_new_address(True))
</code></pre>
<p>where 100 is the number of change addresses to create. The <code>True</code> means a change addresses is created, while <code>False</code> creates a standard receiving address. The problem is solved now :)</p>

CC BY-SA 4.0
2022-02-05T15:39:44.690Z
This did not work until I removed the word "print" from the command
Arman The Parman
CC BY-SA 4.0
2022-03-20T10:54:57.630Z
@ArmanTheParman The syntax I used was for Python2, now updated for something that should work on both Py2 and 3
mxbi
CC BY-SA 4.0
2018-04-01T12:31:18.523Z
2022-03-20T10:54:34.643Z
2022-03-20T10:54:34.643Z
mxbi
<p>So I have an offline wallet created with Electrum. When signing transactions on the cold storage machine, I would like to be able to check that the address I'm sending the change to is actually a change address I own, however since Electrum is offline it's not up-to-date with which addresses have been used, and so the next change address that is used in the transaction hasn't actually been created yet.</p>

<p>For receiving addresses, I was able to manually create these addresses by running:</p>

<pre><code>&gt;&gt; wallet.storage.put('gap_limit', 50)
&gt;&gt; wallet.storage.write()
</code></pre>

<p>in the console, which generates 50 rx addresses worth of keys.</p>

<p>However, this only generates <em>receiving</em> addresses, and I have funds in change addresses beyond the 6 that are generated by default. Unfortunately I haven't found how to increase this gap limit for change addresses. I've tried looking through the electrum source but haven't found anything that would let me change this.</p>

<wallet><electrum><coldstorage>
Generating additional change addresses manually in Electrum
mxbi
# Generating additional change addresses manually in Electrum

(Asked by: username_0 on 2018-03-22)

So I have an offline wallet created with Electrum. When signing transactions on the cold storage machine, I would like to be able to check that the address I'm sending the change to is actually a change address I own, however since Electrum is offline it's not up-to-date with which addresses have been used, and so the next change address that is used in the transaction hasn't actually been created yet.
For receiving addresses, I was able to manually create these addresses by running:
>> wallet.storage.put('gap_limit', 50)
>> wallet.storage.write()

in the console, which generates 50 rx addresses worth of keys.
However, this only generates receiving addresses, and I have funds in change addresses beyond the 6 that are generated by default. Unfortunately I haven't found how to increase this gap limit for change addresses. I've tried looking through the electrum source but haven't found anything that would let me change this.

**Tags:** wallet, electrum, coldstorage


---

## 1 answers

### Answer by username_0 on 2018-04-01. Score: 1 | Accepted answer

I found that in Electrum, you can create additional change addresses by using the console and typing:
for i in range(0, 100): print(wallet.create_new_address(True))

where 100 is the number of change addresses to create. The True means a change addresses is created, while False creates a standard receiving address. The problem is solved now :)

> **Comments:**
> **username_1**: This did not work until I removed the word "print" from the command  
> **username_0**: @ArmanTheParman The syntax I used was for Python2, now updated for something that should work on both Py2 and 3  

---

