Bitcoin Forum
June 13, 2024, 10:27:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Will "-rescan -reindex" find all bad ".blk" files  (Read 852 times)
d4n13 (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
June 20, 2015, 08:23:12 PM
 #1

I think one of my *.blk files might be corrupt.  If I "-rescan -reindex" will it find the bad block and re-acquire it from peers?

More technically, does -rescan verify the hash on each *.blk file?

Thx

Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
June 21, 2015, 02:54:40 AM
 #2

I think one of my *.blk files might be corrupt. [...]

Why do you think so?


-rescan is for the wallet. It will look for your addresses and any balances with them.

-checkblocks=0 will check all your blocks, if that's what you want to do.

https://en.bitcoin.it/wiki/Running_bitcoind#Command-line_arguments

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
d4n13 (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
June 21, 2015, 03:43:33 AM
 #3

Why do you think so?

Failed commit entry in NT system log.  But wallet.dat is fine.

So:
checkblocks=0 # re-checksum each block file
rescan            # rebuild wallet transaction database
rebuild            # reindex rebuilds the whole blockchain transaction database

Got it.

So if I 'tar' my datadir then when I untar it and copy over my wallet.dat, I'll -checkblocks=0 -rescan -rebuild

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!