Bitcoin Forum
July 24, 2019, 05:38:58 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Will "-rescan -reindex" find all bad ".blk" files  (Read 803 times)
d4n13
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

1563946738
Hero Member
*
Offline Offline

Posts: 1563946738

View Profile Personal Message (Offline)

Ignore
1563946738
Reply with quote  #2

1563946738
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1563946738
Hero Member
*
Offline Offline

Posts: 1563946738

View Profile Personal Message (Offline)

Ignore
1563946738
Reply with quote  #2

1563946738
Report to moderator
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


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
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!