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.
2 Answers
-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.
Yes -rescan
will rescan whole the entire blockchain and -reindex
will rebuild your database