bitcoin core – How can I import a personal key right into a pruned node?
Usually, the pockets shipped with Bitcoin Core solely retains copies of any transactions that immediately contain the pockets. Whenever you import a key, your node scans all the blockchain to see if any transactions concerned that key.
A pruned node has processed the entire blockchain, however solely retains the tail finish of the info. Which means if you import a personal key in a pruned node, the pruned node doesn’t have the info to test for related transactions. That is why it’s incompatible with the
rescan requirement. To search out the transactions associated to the important thing, you will have to repeat the preliminary synchronization of the blockchain.
As Prayank already acknowledged in his reply, you would use
importprivkey "<key>" "" false
to import one or a number of personal keys. The “false” within the third argument skips the same old rescan triggered by the import. This could keep away from the error you’re seeing.
After you’ve imported all related keys, you restart your node with the
-reindex commandline choice to start out over with the preliminary sync. Your pockets will scan for related transactions throughout the synchronization and rediscover the funds and transaction historical past of the pockets.
In case you want to keep away from performing one other synchronization along with your node, you would as an alternative import the important thing right into a light-client akin to Electrum as steered by RedGrittyBrick in one other reply.