<p>The arguments for <code>importaddress</code> are:</p>

<p>Arguments:<br>
1. "script"           (string, required) The hex-encoded script (or address)<br>
2. "label"            (string, optional, default="") An optional label<br>
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions<br>
4. p2sh                 (boolean, optional, default=false) Add the P2SH version of the script as well  </p>

<p>So, you need to use <code>./bitcoin-cli importaddress mvcWTfVhCMhwvqQf2TKkEqpLrNdW7Uekod "" false</code></p>

<p>Also, you may consider adding a final <code>true</code> argument after the <code>false</code>.</p>

<p>Note that importing without rescan means your utxo's will not be found (using bad terminology, your addresses will have no balance).</p>

<p>Also, note that since you have so many addresses to import you may wish to consider using <code>importmulti</code> the usage of which is described via <code>./bitcoin-cli help importmulti</code></p>

CC BY-SA 4.0
2018-06-22T01:12:14.093Z
Thank you , it's exactly where the problem is .I'll try to use `importmulti` to import 20,000 addresses.
Augustine Zhang
CC BY-SA 4.0
2018-06-21T10:18:06.100Z
2018-06-21T10:18:06.100Z
Willtech
<p>When I give the import command I get an error after about 15-20 minutes. It's obvious that any other command did't show the same error.</p>

<pre><code>~:./bitcoin-cli importaddress mvcWTfVhCMhwvqQf2TKkEqpLrNdW7Uekod false
error: couldn't connect to server
</code></pre>

<p>I found that client is rescanning blocks in debug.log which should not happen because I have added "false" after address.</p>

<pre><code>2018-06-21 08:39:30 Still rescanning. At block 192380. Progress=0.011339
2018-06-21 08:40:30 Still rescanning. At block 218992. Progress=0.024155
2018-06-21 08:41:30 Still rescanning. At block 237569. Progress=0.036879
2018-06-21 08:42:30 Still rescanning. At block 261271. Progress=0.049859
2018-06-21 08:43:30 Still rescanning. At block 279577. Progress=0.061887
2018-06-21 08:44:30 Still rescanning. At block 294150. Progress=0.072921
2018-06-21 08:45:30 Still rescanning. At block 308378. Progress=0.123854
2018-06-21 08:46:30 Still rescanning. At block 321405. Progress=0.177669
2018-06-21 08:47:30 Still rescanning. At block 332018. Progress=0.230362
2018-06-21 08:48:30 Still rescanning. At block 341285. Progress=0.281512
2018-06-21 08:49:30 Still rescanning. At block 349955. Progress=0.329082
2018-06-21 08:50:30 Still rescanning. At block 358093. Progress=0.376275
2018-06-21 08:51:30 Still rescanning. At block 364784. Progress=0.417902
2018-06-21 08:52:30 Still rescanning. At block 370366. Progress=0.450470
</code></pre>

<p>The error :couldn’t connect to server shouldn’t happen even though blocks scanned because of import commend. And when running a shell script I wrote for the loop of importing address alarmed another error.</p>

<pre><code>2018-06-21 08:33:57 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
2018-06-21 08:34:18 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
2018-06-21 08:34:24 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
</code></pre>

<p>I wonder what the default rpcworkqueue is. And I did't find -rpcworkqueue command when I am using -h in bitcoind.</p>

<p>Following is my bitcoin.conf.By the way ,I didn't put block chain data in default place,but I assigned the position of block chain data and bitoin.conf when start bitcoin core.Following is content of bitcoin.conf.</p>

<pre><code>txindex=1
server=1
rpcuser=username
rpcpassword=password
rpcbind=0.0.0.0
rpcport=8545
rpcallowip=0.0.0.0/32
</code></pre>

<p>Finnaly ,if adding "false" is useless,import one address about to spent one hour,and I need to import 20,000 adress that may cost 2.2 years.That impossible for me to wait so long. </p>

<bitcoin-core><importaddress>
bitcoin-cli error: couldn't connect to server on importaddress
Augustine Zhang
# bitcoin-cli error: couldn't connect to server on importaddress

(Asked by: username_0 on 2018-06-21)

When I give the import command I get an error after about 15-20 minutes. It's obvious that any other command did't show the same error.

```
~:./bitcoin-cli importaddress mvcWTfVhCMhwvqQf2TKkEqpLrNdW7Uekod false
error: couldn't connect to server

```

I found that client is rescanning blocks in debug.log which should not happen because I have added "false" after address.

```
2018-06-21 08:39:30 Still rescanning. At block 192380. Progress=0.011339
2018-06-21 08:40:30 Still rescanning. At block 218992. Progress=0.024155
2018-06-21 08:41:30 Still rescanning. At block 237569. Progress=0.036879
2018-06-21 08:42:30 Still rescanning. At block 261271. Progress=0.049859
2018-06-21 08:43:30 Still rescanning. At block 279577. Progress=0.061887
2018-06-21 08:44:30 Still rescanning. At block 294150. Progress=0.072921
2018-06-21 08:45:30 Still rescanning. At block 308378. Progress=0.123854
2018-06-21 08:46:30 Still rescanning. At block 321405. Progress=0.177669
2018-06-21 08:47:30 Still rescanning. At block 332018. Progress=0.230362
2018-06-21 08:48:30 Still rescanning. At block 341285. Progress=0.281512
2018-06-21 08:49:30 Still rescanning. At block 349955. Progress=0.329082
2018-06-21 08:50:30 Still rescanning. At block 358093. Progress=0.376275
2018-06-21 08:51:30 Still rescanning. At block 364784. Progress=0.417902
2018-06-21 08:52:30 Still rescanning. At block 370366. Progress=0.450470

```

The error :couldn’t connect to server shouldn’t happen even though blocks scanned because of import commend. And when running a shell script I wrote for the loop of importing address alarmed another error.

```
2018-06-21 08:33:57 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
2018-06-21 08:34:18 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
2018-06-21 08:34:24 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting

```

I wonder what the default rpcworkqueue is. And I did't find -rpcworkqueue command when I am using -h in bitcoind.

Following is my bitcoin.conf.By the way ,I didn't put block chain data in default place,but I assigned the position of block chain data and bitoin.conf when start bitcoin core.Following is content of bitcoin.conf.

```
txindex=1
server=1
rpcuser=username
rpcpassword=password
rpcbind=0.0.0.0
rpcport=8545
rpcallowip=0.0.0.0/32

```

Finnaly ,if adding "false" is useless,import one address about to spent one hour,and I need to import 20,000 adress that may cost 2.2 years.That impossible for me to wait so long.

**Tags:** bitcoin-core, importaddress


---

## 1 answers

### Answer by username_1 on 2018-06-21. Score: 2 | Accepted answer

The arguments for `importaddress` are:

Arguments:  
1. "script" (string, required) The hex-encoded script (or address)  
2. "label" (string, optional, default="") An optional label  
3. rescan (boolean, optional, default=true) Rescan the wallet for transactions  
4. p2sh (boolean, optional, default=false) Add the P2SH version of the script as well

So, you need to use `./bitcoin-cli importaddress mvcWTfVhCMhwvqQf2TKkEqpLrNdW7Uekod "" false`

Also, you may consider adding a final `true` argument after the `false`.

Note that importing without rescan means your utxo's will not be found (using bad terminology, your addresses will have no balance).

Also, note that since you have so many addresses to import you may wish to consider using `importmulti` the usage of which is described via `./bitcoin-cli help importmulti`

> **Comments:**
> **username_0**: Thank you , it's exactly where the problem is .I'll try to use `importmulti` to import 20,000 addresses.  

---

