linux-0.1.6-test7
首次公开证据
打开首次公开证据查看 1 个交叉存档
来源说明
Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial
测试版 7:
运行前请备份你的数据目录,以防万一。
这是针对 Db::open/Db::close“Bad file descriptor”异常的变通办法。它也可能让初始区块下载更快。这个办法是打开数据库句柄,并在程序整个运行期间保持打开,这其实本来就是更常见的做法。如果我们不再反复关闭和打开,错误应该就没有机会发生。
唯一的例外是 wallet.dat,写入完成后我仍会关闭它,以便把交易日志刷新到 dat 文件中,使这个 dat 文件能够独立使用。这样,如果有人在比特币运行时进行备份,得到的 wallet.dat 无须数据库交易日志也能单独有效。
这是对数据库处理方式的一次重构,因此我们可能会遇到一些新的死锁。通常如果发生死锁,要么 UI 会停止重绘,要么即使仍显示 Generating,也会停止使用 CPU。
英文原文
展开英文原文
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.