Post
Topic
Board Development & Technical Discussion
Re: [PULL] private key and wallet export/import
by
rabit
on 09/07/2011, 11:39:08 UTC
Exporting of a key has a problem, doesn't it: the key is still in the source wallet. There's no way to remove it, is there? Even if there is, it's easy to screw up and people will wonder where their money went.

So how about splitting this and putting importprivkey in default, but not dumpprivkey?

Does this mean that  dumpprivkey removes the private key from the wallet, because the documentation is not clear for me and i am too lazy to learn C++ (it could also just show the data of the key without removing it)?

Quote
Well, I did a patch to remove keys, but it doesn't apply to the current state (after wallet class rework) anymore.
Also, you should really know what you are doing and review my code thoroughly before you use it, as I'm a total noob when it comes to C++ and I'm not confident on my grasp of the inner workings of bitcoin either...

https://github.com/mhanne/bitcoin/tree/showwallet-removeprivkey

http://forum.bitcoin.org/index.php?topic=19451

Unfortunately i need both import and export and my C++ is limited to the C part without the (confusing Cheesy) ++, but i will try to use it if no better solution is implemented. Will send you and sipa 0.5 BTCs.

EDIT: Nice, your version also have importkey if i read your code correct, will try it out Smiley