Bitcoin qt import wallet data


You can see blocks as 'patches' to the chain state they consume some unspent outputs, and produce new ones , and see the undo data as reverse patches.

They are necessary for rolling back the chainstate, which is necessary in case of reorganizations. This section may be of use to you if you wish to send a friend the blockchain, avoiding them a hefty download. The database files in the "blocks" and "chainstate" directories are cross-platform, and can be copied between different installations. These files, known collectively as a node's "block database", represent all of the information downloaded by a node during the syncing process.

In other words, if you copy installation A's block database into installation B, installation B will then have the same syncing percentage as installation A. This is usually far faster than doing the normal initial sync over again. However, when you copy someone's database in this way, you are trusting them absolutely.

If an attacker is able to modify your block database files, then they can do all sorts of evil things which could cause you to lose bitcoins. Therefore, you should only copy block databases from Bitcoin installations under your personal control, and only over a secure connection.

Each node has a unique block database, and all of the files are highly connected. So if you copy just a few files from one installation's "blocks" or "chainstate" directories into another installation, this will almost certainly cause the second node to crash or get stuck at some random point in the future.

If you want to copy a block database from one installation to another, you have to delete the old database and copy all of the files at once. Both nodes have to be shut down while copying. Only the file with the highest number in the "blocks" directory is ever written to. Despite this, best practice is to immediately send the remaining balance to a paper wallet that was generated offline.

Use this function if you would like to import a private key so all funds are immediately available for spending. After importing this paper private key, you might consider destroying the original so it cannot be found and your funds stolen. Alternatively, you can keep it safe to be used as an offline backup. If you have Version 7 or later it is now trival. If you are using Cold storage , a Paper wallet or generating vanity addresses you may have a need to import a Private key.

This article describes how to import a private key through the RPC API of bitcoind, which is a topic for advanced users. Instead, you need to start the bitcoind server.

If you have an encrypted wallet recommended , you need to unlock it temporarily before importing private keys. Typing this directly in a bash terminal will leave your wallet passphrase directly in the bash history but there are a couple of techniques you can use to avoid this.

Simply add a space before the command:. The last command unlocked your wallet temporarily for seconds, during which time you must import your private keys. Since private keys can be as important as your passphrase, you may want to use the same techniques as above to prevent their being recorded in bash history bash variable or space before the command:.

The importing process is now started. Bitcoind will rescan the entire block data to ensure this key has not been used before. This process will take from one to two minutes, depending on your CPU performance.

DO NOT abort it before finishing! If no errors occurs, the import is a success and Bitcoin-QT users will be able to see the new address in the GUI immediately. If you need to import more keys, just repeat the instructions above.