Author

Topic: rpc command 'getnewaddress' returns used addresses? (Read 469 times)

legendary
Activity: 1453
Merit: 1030
What kind of debug were you referring to? From the debug.log file?
Yes, the debug.log file. It might have some info in there about why this happened. It also might not.

It just occured to me, I have 2 copies of the blockchain.
They run identical wallet.dat files, but the first won't know that the second has given out an address.
That must be it. My bad.
staff
Activity: 3458
Merit: 6793
Just writing some code
What kind of debug were you referring to? From the debug.log file?
Yes, the debug.log file. It might have some info in there about why this happened. It also might not.
legendary
Activity: 1453
Merit: 1030
It should give you a new address every time. However, IIRC, there's sometimes it won't if the keypool has not been refilled recently. For the keypool to not be refilled recently, you would have had to have requested the number of addresses in your keypool since the last time your wallet was unlocked.

Could you post the debug.log?

That is exactly what I thought. But that is impossible, I have 10000 addresses in this wallet & rarely use it. What kind of debug were you referring to? From the debug.log file?
staff
Activity: 3458
Merit: 6793
Just writing some code
It should give you a new address every time. However, IIRC, there's sometimes it won't if the keypool has not been refilled recently. For the keypool to not be refilled recently, you would have had to have requested the number of addresses in your keypool since the last time your wallet was unlocked.

Could you post the debug.log?
legendary
Activity: 1453
Merit: 1030
I was under the impression that the above mentioned rpc command in bitcoin core returns an unused bitcoin address.
After my last transaction I noticed when checking the confirmations, that the address had already received bitcoin.
My keypool has 10000 addresses, so lack of addresses can't be the issue. Is my understanding of the client wrong that 'getnewaddress' returns an unused address?

Thanks.
Jump to: