When I try to run importaddress using the core client it takes a long time to execute, over 10 minutes, even though I have supplied a "false" argument for rescanning. For example:

bitcoin-cli importaddress "32jdC23ABv86M2ptiqMzFzCaufBtE2NCdN" false

When I run this, it takes so long to compute that it times out with "unable to connect to server error". If it is not rescanning, what is it doing? Why is it taking so long just to add an address to the wallet?

(note that adding a label field makes no difference, it still hangs)

  • Are other commands working ok, for example listaddressgroupings? What version of Bitcoin Core are you running? – Adam Millerchip Dec 7 '17 at 6:44
  • @AdamMillerchip Nothing works. The daemon is not responding. – Tyler Durden Dec 7 '17 at 6:56
  • 1
    The second argument is a label isn't it, not the scan boolean? It's also scanning, not hanging, it has to read 150GB of blocks from disk and filter them. – Anonymous Dec 7 '17 at 8:31
  • Can you specify what Operating System and Bitcoin client versions you are using ? – dbkeys Dec 13 '17 at 17:27
  • Could you try with another server, internet connection? Because i'm pretty sure the issue is with your server, internet connection because this function is working pretty good and i guess it's not something with Bitcoin core. – Adam Dec 13 '17 at 18:01

Use Bitcoin Core 0.14 (or higher) and the new importmulti RPC call.

importaddress does always a complete rescan (back to the genesis block) which can take serval hours. Very inefficient if you import multiple addresses.

where importmulti can import multiple keys/addresses at once only requiring a single rescan. You can also set the according address birthday timestamp to avoid rescanning the complete chain from the genesis block.

  • 1
    And here is how to use it: bitcoin.stackexchange.com/a/64364/2075 – Jus12 Dec 7 '17 at 11:03
  • it's not always re-scanning the blockchain, you can supply false argument for rescanning. quote from Bitcoin.org: Set to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transaction affecting the newly-added address or pubkey script). Set to false to not rescan the block database (rescanning can be performed at any time by restarting Bitcoin Core with the -rescan command-line argument). Rescanning may take several minutes. – Adam Dec 8 '17 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.