Bitcoin Forum
May 22, 2024, 12:07:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do blocks ever get removed from disk?  (Read 918 times)
CuriousCarl (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
January 25, 2015, 09:06:34 PM
 #1

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?
AhmedMSedeek
Member
**
Offline Offline

Activity: 79
Merit: 10


View Profile
January 25, 2015, 09:25:45 PM
 #2

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
CuriousCarl (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
January 25, 2015, 09:35:07 PM
 #3

Thanks!
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
January 26, 2015, 11:38:43 AM
 #4

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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Madness
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


My goal is becaming a billionaire.


View Profile WWW
January 26, 2015, 11:54:16 AM
 #5

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

williamho
Member
**
Offline Offline

Activity: 113
Merit: 10


View Profile
January 26, 2015, 03:41:09 PM
 #6

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.
Madness
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


My goal is becaming a billionaire.


View Profile WWW
January 26, 2015, 03:43:58 PM
 #7

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 .

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!