Bitcoin Forum
May 12, 2024, 10:29:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Odd importprivkey behavior?  (Read 3149 times)
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
January 04, 2013, 05:12:24 PM
 #1

I'm not sure if this is:

  • A known issue with 0.7.1
  • Something I did wrong
  • Something I'm misunderstanding

In the Debug window Console, I entered:
Code:
importprivkey 5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF "This is a test"

Issue 1
After the client finished scanning the blockchain, the "This is a test" label showed up in the "Address Book" tab in my client?  I expected to see it in my "Receive coins" tab.

I selected the "This is a test" row from the "Address Book" and clicked the "Delete" button on the bottom of the window.  The "This is a test" row disappeared from the window as expected.

In the Debug window Console, I then entered:
Code:
dumpprivkey 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj

I received the previously imported 5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF key as output.  I assumed that this means that the private key and address are still in my wallet even though the address no longer shows up in either the "Address Book" window nor the "Receive coins" window.  I figured maybe the client was recognizing the address the way it does a change address.

In the Debug window Console, I then entered:
Code:
listreceivedbyaddress 0 true

Issue 2
I expected this to list ALL addresses in my wallet.  However, I didn't see the 1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj in the list at all?

Any explanations as to what is going on here would be appreciated.
1715552953
Hero Member
*
Offline Offline

Posts: 1715552953

View Profile Personal Message (Offline)

Ignore
1715552953
Reply with quote  #2

1715552953
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715552953
Hero Member
*
Offline Offline

Posts: 1715552953

View Profile Personal Message (Offline)

Ignore
1715552953
Reply with quote  #2

1715552953
Report to moderator
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 05, 2013, 03:56:26 PM
 #2

Actually in playing around with the "raw tx's" API and then using "importprivkey" for an "offline" generated address I experienced a similar problem (didn't see the address in the "receive" list but did see the unspent output in the "listunspent" list).

I resolved my problem by sending another tx from the unspent output to another address that *was* in my "receive" list but still don't quite understand why the problem happened.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
247saver
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
January 05, 2013, 05:20:10 PM
 #3

There's definitely something quirky.  I tried previously in the GUI and had to restart it sometimes to get the newly imported addresses to appear.
rickylford
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile WWW
February 06, 2013, 12:16:41 AM
 #4

This is a semi-old thread, but I wanted to report to you all what happened to me.

I imported a private key, and as stated in the OP, it showed up in my "Address Book", not my "Receive Coins" list. Well, what I did was shut down the Bitcoin-QT client and re-opened it. When I re-opened it, it told me the wallet was out of sync, and after it finished getting IN sync (hahaha) it showed up in my "Receive Coins" list like I expected it to from the get-go.

I haven't tested sending money to it and sending money out of it, but I'll do that later on when I have enough coins to lost in case something goes wrong.
Rygon
Hero Member
*****
Offline Offline

Activity: 520
Merit: 500


View Profile
February 06, 2013, 08:11:12 PM
 #5

I've haven't used that function previous to 0.7.1, so I don't know if it's new. Same thing happened to me. Just had to restart bitcoin-qt before it showed up in the right spot. I figure that it adds it to the wallet.dat file, but doesn't re-import it to the program. Or something. It's on my growing list of user unfriendly features of Bitcoin-qt.
PoorGirl
Newbie
*
Offline Offline

Activity: 30
Merit: 0



View Profile
April 07, 2013, 06:35:30 PM
 #6

If a new private key is added it ends up in the address book first. Well, we see only its address.

When the next new block is received and processed that new address is scanned against the new block (transaction list) and the address moves to "receive coins".

Still a rescan is needed if that address has old coins sitting around as without a rescan you will never see them.


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!