Author

Topic: generate more than 20 adresses (Read 416 times)

full member
Activity: 212
Merit: 108
July 19, 2017, 10:05:00 AM
#8
Thank you.

Remember to restart electrum afterwards because the extra addresses won't show without a restart.

I found out, that it is not enough to close the Electrum account in which I generated the additional addresses, if there is at the same time still another account open. I have to close all open accounts before I restart.

HCP
legendary
Activity: 2086
Merit: 4363
July 18, 2017, 11:43:51 PM
#7
Looks like i receive an error when typing this the same code..

Code:
>> for x in range(0, 50):
print wallet.create_new_address(False)
Traceback (most recent call last):
    nt wallet.create_new_address(False)
            ^
SyntaxError: invalid syntax

Let me know what version of electrum you are using?

The reason for the error is that the console is a sort of pseudo Python console... Python relies on "indentation" to form code blocks... so you need to indent the "print" statement for it to be considered part of the "for x in range" statement:

Code:
for x in range(0, 50):
    print wallet.create_new_address(False)

Note the extra spaces at the beginning of the print line! This is why you need to be very careful when using copy/paste on Python code... it can lead to unexpected results... you should always copy/paste each line (including the leading whitespace!!) one at a time...
legendary
Activity: 2772
Merit: 2846
July 18, 2017, 06:04:31 PM
#6
...This one works great but i type first the gap limit code before the generate new address above..
But i just notice that they are marked as red well this method should be work with the op since its work fine with me.  and generate almost 50 new address.
I restarted the electrum wallet but why the other address generated was marked as red?


That's expected behaviour and nothing to worry about. Electrum will always show the extra addresses in red until the gap is filled. The electrum documentation explains it.



The electrum documentation explains the gap limit. After setup electrum has a default number of addresses it shows, that default number is the gap limit. You can make electrum show more new unused addresses using console commands, but any it shows will have a red background until the gap is filled.

http://docs.electrum.org/en/latest/faq.html#how-can-i-pre-generate-new-addresses

Quote
Electrum will generate new addresses as you use them, until it hits the gap limit

If you need to pre-generate more addresses, you can do so by typing wallet.create_new_address(False) in the console. This command will generate one new address. Note that the address will be shown with a red background in the address tab, to indicate that it is beyond the gap limit. The red color will remain until the gap is filled.


hero member
Activity: 924
Merit: 1001
July 18, 2017, 05:46:05 PM
#5
Looks like i receive an error when typing this the same code..

Code:
>> for x in range(0, 50):
print wallet.create_new_address(False)
Traceback (most recent call last):
    nt wallet.create_new_address(False)
            ^
SyntaxError: invalid syntax

Let me know what version of electrum you are using?

Weird syntax error. Can you try to write it only using one line?
Code:
for i in range(0, 50): print wallet.create_new_address(False)

Like this and if it doesn't work can you try using this and restarting the app :

Code:
wallet.storage.put('gap_limit',50)

This one works great but i type first the gap limit code before the generate new address above..
But i just notice that they are marked as red well this method should be work with the op since its work fine with me.  and generate almost 50 new address.
I restarted the electrum wallet but why the other addresses generated was marked as red?
full member
Activity: 140
Merit: 100
July 18, 2017, 05:27:01 PM
#4
Looks like i receive an error when typing this the same code..

Code:
>> for x in range(0, 50):
print wallet.create_new_address(False)
Traceback (most recent call last):
    nt wallet.create_new_address(False)
            ^
SyntaxError: invalid syntax

Let me know what version of electrum you are using?

Weird syntax error. Can you try to write it only using one line?
Code:
for i in range(0, 50): print wallet.create_new_address(False)

Like this and if it doesn't work can you try using this and restarting the app :

Code:
wallet.storage.put('gap_limit',50)
hero member
Activity: 924
Merit: 1001
July 18, 2017, 05:22:28 PM
#3
Looks like i receive an error when typing this the same code..

Code:
>> for x in range(0, 50):
print wallet.create_new_address(False)
Traceback (most recent call last):
    nt wallet.create_new_address(False)
            ^
SyntaxError: invalid syntax

Let me know what version of electrum you are using?
legendary
Activity: 2772
Merit: 2846
July 18, 2017, 05:05:01 PM
#2
These instructions should work. Remember to restart electrum afterwards because the extra addresses won't show without a restart. If you ever restore your wallet from seed you will have to increase the gap limit again to see those extra addresses.

Quote

Click the console tab to open the console window, then paste the line of text below into it, then press your enter key.

wallet.change_gap_limit(50)

Restart electrum to view the extra addresses.

Adjust the number shown in red to increase or decrease the number of addresses you want.

If you ever restore your wallet from seed you will have to repeat that process to view those addresses.

full member
Activity: 212
Merit: 108
July 18, 2017, 02:58:28 PM
#1
As I wanted to generate new addresses behind the gap limit. So I changed in Electrum into the console Tab.

Then I typed in

Code:
for x in range(0, 50):
print wallet.create_new_address(False)

and pressed "enter".

My expectation was now, that in the adresse tab I have now additional adresses. But I did not found any change in the adress tab.

No idea how I have to use the console and the code above suggesfully.

Can you help me?
Jump to: