LarryRuane / bitcoin

Bitcore Bitcoin build with address indexes
https://bitcore.io/bitcoin
MIT License
0 stars 0 forks source link

revive 26535 - reindex: allow finalized blk files to use read-only permissions #6

Open LarryRuane opened 1 year ago

LarryRuane commented 1 year ago

https://github.com/bitcoin/bitcoin/pull/26535

I think a good way to do this is, first, wait for #27039 to merge. This prevents flushing to blk files that are already full (128 mb), but still has the problem that if all blk files are set to read-only, then when the system tries to write to and flush the last partial blk file, it fails.

Why not, when this error occurs, pretend the blk file is full (leave it partially filled) and go and create a brand new one (which would be read-write).