How to resynchronize all blocks using `bitcoin-cli`?

0

1

Sometimes, I need to resynchronize all blocks using bitcoin core, but I want to do that through bitcoin-cli. I found a command called -rescan that may resolve my question on this site, but as I searched the api list of bitcoin on the official site for -rescan, I couldn't find it out, therefore, I want to make it sure.

西田龍

Posted 2018-02-02T13:11:13.377

Reputation: 59

Answers

0

-rescan is for your wallet. It will check for missing transactions on startup. If you want to resynchronize all blocks then I think you want to use -reindex which will rebuild chain state and block index from the blk*.dat files on disk. Of course, these are command line parameters.

You can probably use verifychain on bitcoin-cli. Type bitcoin-cli help verifychain for information.

Willtech

Posted 2018-02-02T13:11:13.377

Reputation: 2 657

0

Yes -rescan will rescan whole the entire blockchain and -reindex will rebuild your database

zhiyan114

Posted 2018-02-02T13:11:13.377

Reputation: 528