I am revising my blockchain parser and I'm encountering an issue where I only have block headers but not the corresponding block data on my machine for blocks past a certain height (on my machine it started at block #594606 and from there on I only had data for some blocks.) There is a bit flag 'BLOCK_HAVE_DATA' which, if not set, indicates that we have the header in the leveldb database but not the corresponding block data on disk in the .dat files.
Unfortunately I need that data for my parser to work, so I don't know (a) why it is missing and (b) how to get the data on my hard drive.
Is there some command line option I can pass when I launch the bitcoin core node software for make sure I have data for all blocks on my hard drive?
John W. Ratcliff
** Note: I asked this question of ChatGPT and it provided the following response. I don't know if it is correct or not, but I'm going to try it.