原始文献 / 论坛帖 / Re: 0.3 almost ready

Re: 0.3 almost ready

Bitcointalk · 2010-06-22 19:46:23 UTC

AuthorSatoshi Nakamoto
TitleRe: 0.3 almost ready
Date2010-06-22 19:46:23 UTC
ForumBitcointalk · 原文

你比我回复的速度还快,自己就找到了原因。

看起来 laszlo 构建的 Berkeley DB 所用的 database/log.* 文件与我们的不兼容。.dat 文件没问题,它们的格式应该永远不会变。所有数据都存放在 .dat 文件里。你自己的所有数据都存放在 wallet.dat 中。如果你等它重新下载完区块链,等区块链同步到那些交易被记录的位置时,你丢失的交易和已生成的币就会重新出现。

你把目录复制过去但排除了 log.0000000002,这是最好的解决办法。你现在应该没问题了。

database/log.* 文件只包含临时的数据库数据。如果你上次是正常退出 bitcoin 的,而不是强制终止或崩溃退出,那么 database/log.* 文件通常可以安全删除。它们只用于这种情况:如果数据库在事务进行中时电脑崩溃、程序被终止或崩溃,那么它可以恢复而不丢失数据。

如果可能的话请继续运行 v0.3,不要退回 v0.2.10。

其他遇到这个问题的人,请把 database\log.000000000* 文件移到别处。(如果之后运行正常,可以再删除它们)

我不太愿意让安装程序去删除或移动这些文件。如果上一次运行是因崩溃或被终止而停止的,那么那样做就是错的。

英文原文

You figured it out faster than I could post a reply.

It looks like laszlo's build of Berkeley DB has database/log.* files that are not compatible with ours.  The .dat files are fine, their format shouldn't ever change.  All data is stored in the .dat files.  All your own data is stored in wallet.dat.  If you had waited for it to redownload the block chain, your missing transactions and generateds would have appeared as the block chain reached the point where those transactions were recorded.

When you copied the directory except log.0000000002, that's the best solution.  You should be good now.

The database/log.* files only contain temporary database data.  If you exited bitcoin normally the last time, not exited by forced terminating it or crashing, then the database/log.* files can normally be deleted safely.  They're only used so that if the database is in the middle of a transaction when the computer crashes or the program is killed or crashes, then it could recover without losing data.

Please keep running v0.3 if at all possible, don't go back to v0.2.10.

Anyone else who hits this problem, move the database\log.000000000* files somewhere else.  (if it works fine after that, you can delete them later)

I'm reluctant to make the installer delete or move those files.  If the previous run was stopped by crashing or killed, that would be the wrong thing to do.