linux-0.1.6-test7

test 7:

Backup your data directory before running this, just in case.

Workaround for the Db::open/Db::close “Bad file descriptor” exception. Might also make the initial block download faster. The workaround is to open the database handles and keep them open for the duration of the program, which is actually the more common thing to do anyway. If we’re not closing and opening all the time, the error shouldn’t get a chance to happen.

The one exception is wallet.dat, which I still close after writing is finished so I can flush the transaction logs into the dat file, making the dat file standalone. That way if someone does a backup while Bitcoin is running, they’ll get a wallet.dat that is valid by itself without the database transaction logs.

This is a restructuring of the database handling, so we might find some new deadlocks. Usually if it deadlocks, either the UI will stop repainting, or it’ll stop using CPU even though it still says Generating.

Original Source

https://mmalmi.github.io/satoshi/
Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

Also available at