Post
Topic
Board Development & Technical Discussion
Re: [PULL] private key and wallet export/import
by
riush
on 18/07/2011, 22:13:15 UTC
Nice! much better than what I tried to do Tongue

I'm just having a 'little' problem with importing keys; the import fails, and even if I didn't remove the key, it is not listed anymore; but it seems to be there somehow...

Quote
foo@bar:~/work/bitcoin/src$ ./bitcoind getaddressesbyaccount foobar
[
    "mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK"
]
foo@bar:~/work/bitcoin/src$ ./bitcoind dumpprivkey mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK
92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh
( foo@bar:~/work/bitcoin/src$ ./bitcoind removeprivkey 92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh )
foo@bar:~/work/bitcoin/src$ ./bitcoind importprivkey 92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh
error: {"code":-4,"message":"Error adding key to wallet"}
foo@bar:~/work/bitcoin/src$ ./bitcoind getaddressesbyaccount foobar
[
]
foo@bar:~/work/bitcoin/src$ ./bitcoind getaccountaddress foobar
mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK

Behaves the same no matter if I removed the key or not; AFAIS it shouldn't be in getaccountaddress if I did, and should be in getaddressesbyaccount if i didn't.

Am I understanding or doing something wrong here?