4

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?

1 Answer 1

9
bitcoin-cli invalidateblock `bitcoin-cli getbestblockhash`

or

bitcoind -maxconnections=0
4
  • Thanks for your answer! Can you tell me, how can I "undo" the invalidateblock command so the sync will be continued? Oct 23, 2018 at 22:58
  • 1
    reconsiderblock <hash>
    – Claris
    Oct 23, 2018 at 22:59
  • 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
    Jan 31, 2019 at 10:41
  • It still works.
    – Claris
    Jan 31, 2019 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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