How do I prevent Bitcoin from synchronizing?

3

1

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?

Nick ODell

Posted 2015-08-06T01:09:30.940

Reputation: 26 536

Answers

7

bitcoin-cli invalidateblock `bitcoin-cli getbestblockhash`

or

bitcoind -maxconnections=0

Anonymous

Posted 2015-08-06T01:09:30.940

Reputation: 10 054

Thanks for your answer! Can you tell me, how can I "undo" the invalidateblock command so the sync will be continued?Sergey Potekhin 2018-10-23T22:58:27.210

1reconsiderblock <hash>Anonymous 2018-10-23T22:59:18.577

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 2019-01-31T10:41:47.117

It still works.Anonymous 2019-01-31T11:24:28.787