<pre><code>bitcoin-cli invalidateblock `bitcoin-cli getbestblockhash`
</code></pre>

<p>or</p>

<pre><code>bitcoind -maxconnections=0
</code></pre>

CC BY-SA 4.0
2018-10-23T22:58:27.210Z
Thanks for your answer! Can you tell me, how can I "undo" the `invalidateblock` command so the sync will be continued?
Sergey Potekhin
CC BY-SA 4.0
2018-10-23T22:59:18.577Z
`reconsiderblock <hash>`
Claris
CC BY-SA 4.0
2019-01-31T10:41:47.117Z
Is invalidateblock still working? How much of a hack is this? Is there a less hacky way to do this already? Like a config entry?
nopara73
CC BY-SA 4.0
2019-01-31T11:24:28.787Z
It still works.
Claris
CC BY-SA 3.0
2015-08-06T01:19:51.167Z
2015-08-06T01:19:51.167Z
Claris
<p>I have a script that uses Bitcoin's RPC interface and takes a lot of CPU to run, and I don't want Bitcoin to be verifying blocks while I do it. Is there a config setting or an RPC call I can use to stop it from syncing?</p>

<bitcoind><synchronization>
How do I prevent Bitcoin from synchronizing?
Nick ODell
# How do I prevent Bitcoin from synchronizing?

(Asked by: username_0 on 2015-08-06)

I have a script that uses Bitcoin's RPC interface and takes a lot of CPU to run, and I don't want Bitcoin to be verifying blocks while I do it. Is there a config setting or an RPC call I can use to stop it from syncing?

**Tags:** bitcoind, synchronization


---

## 1 answers

### Answer by username_1 on 2015-08-06. Score: 9 | Accepted answer

```
bitcoin-cli invalidateblock `bitcoin-cli getbestblockhash`

```

or

```
bitcoind -maxconnections=0

```

> **Comments:**
> **username_2**: Thanks for your answer! Can you tell me, how can I "undo" the `invalidateblock` command so the sync will be continued?  
> **username_1**: `reconsiderblock <hash>`  
> **username_3**: Is invalidateblock still working? How much of a hack is this? Is there a less hacky way to do this already? Like a config entry?  
> **username_1**: It still works.  

---

