Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: CuriousCarl on January 25, 2015, 09:06:34 PM



Title: Do blocks ever get removed from disk?
Post by: CuriousCarl on January 25, 2015, 09:06:34 PM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?


Title: Re: Do blocks ever get removed from disk?
Post by: AhmedMSedeek on January 25, 2015, 09:25:45 PM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?


Correct


Title: Re: Do blocks ever get removed from disk?
Post by: CuriousCarl on January 25, 2015, 09:35:07 PM
Thanks!


Title: Re: Do blocks ever get removed from disk?
Post by: ranochigo on January 26, 2015, 11:38:43 AM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?

They will never ever delete themself and you should never delete them, deleting any part of the blockchain would invalidate it and will require you to download them again. Unless they get corrupted, they will be valid. The Bitcoin core verify every single of the block during start up and they will inform you if it gets corrupted.


Title: Re: Do blocks ever get removed from disk?
Post by: Madness on January 26, 2015, 11:54:16 AM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?


Never , they never gets deleted mate unless you do it your self . and If you delete your self then Bitcoin Core will download them once again and check them while start up
Path : %appdata%\Bitcoin\blocks , try to delete one of them and you will see your wallet Re-downloading it once again


Title: Re: Do blocks ever get removed from disk?
Post by: williamho on January 26, 2015, 03:41:09 PM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?


Never , they never gets deleted mate unless you do it your self . and If you delete your self then Bitcoin Core will download them once again and check them while start up
Path : %appdata%\Bitcoin\blocks , try to delete one of them and you will see your wallet Re-downloading it once again
I don't see why I would do that. It will re-download the same blocks.


Title: Re: Do blocks ever get removed from disk?
Post by: Madness on January 26, 2015, 03:43:58 PM
It seems that blocks are written to disk in the WriteBlockToDisk function in main.cpp. But I haven't found where they are deleted. Maybe they don't ever get deleted from disk? Once written they are always valid?


Never , they never gets deleted mate unless you do it your self . and If you delete your self then Bitcoin Core will download them once again and check them while start up
Path : %appdata%\Bitcoin\blocks , try to delete one of them and you will see your wallet Re-downloading it once again
I don't see why I would do that. It will re-download the same blocks.

LOL ? Well this is what I just said and I'am trying to explain to OP what will happen if you delete them .