SN-10230 附来源、原文与上下文。
如果你编译这些依赖库,告诉我进展如何。在 Windows 上编译东西总是比在 Linux 上更麻烦。我一直很讨厌依赖一大堆大型库的项目,但这里没法避免,每一个都是必需的。
If you build the dependencies, let me know how that goes. Everything is always harder to build on Windows than Linux. I've always hated projects with a lot of big dependencies, but there's no avoiding it, each one is essential.
我还是没弄明白,你的磁盘满了之后,为什么出现的是读取异常,而不是写入异常。虽然可能性不大,但这件事也许破坏了你的区块数据文件。要是这样,可能还会出现类似的异常;如果状态栏里的区块数量不再增加,也说明有问题。此时此刻,区块数量是 375。
I still haven't figured out how you managed to get a read exception rather than a write exception when your disk filled up. It's unlikely but maybe possible that the incident could have messed up your block data file. In that case, it might manifest as a similar exception again, or if your block count in the status bar stopped going up, that would also indicate a problem. As of this moment it's at 375 blocks.
如果有问题,删除区块文件就能轻松解决,步骤如下:
If there is a problem, it could easily be solved by deleting your block files, as follows:
(退出 Bitcoin,并确认它已经停止运行)
(exit Bitcoin and make sure it's stopped)
cd /d "%appdata%\bitcoin"
cd /d "%appdata%\bitcoin"
(先备份这个目录)
(backup this directory first)
del blk0001.dat
del blkindex.dat
del blk0001.dat
del blkindex.dat
然后它会重新下载区块链。在下载完成之前,你的交易和生成的区块会显示为 0/unconfirmed(0 次确认/未确认)。
It'll then re-download the block chain. Your transactions and generated blocks show as 0/unconfirmed until it's done downloading.
最重要、必须备份的文件是 wallet.dat。如果 bitcoin 正在运行,你就必须备份整个 %appdata%\bitcoin 目录,包括 database 子目录;不过,即使它没有运行,每次都备份整个目录,肯定也会让人觉得更放心。
The crucial file to backup is wallet.dat. If bitcoin is running then you have to backup the whole %appdata%\bitcoin directory including the database subdirectory, but even if it's not running it certainly feels safer to always backup the whole directory.
可惜,数据库会把自己的文件命名为“log.0000000001”。对其他人来说,“log”意味着可以随便删除;但对做数据库的人来说,它意味着删了就会丢掉其他文件里的全部内容。我把这些文件放进 database 子目录,尽量避免它们被误删。之后我会编写代码,在每次钱包发生变化后刷新日志,让 wallet.dat 几乎随时都可以安全地单独保存。
The database unfortunately names its files "log.0000000001". To the rest of the world, "log" means delete-at-will, but to database people it means delete-and-lose-everything-in-your-other-files. I tried to put them out of harm's way by putting them in the database subdirectory. Later I'll write code to flush the logs after every wallet change so wallet.dat will be standalone safe almost all the time.
Satoshi
Satoshi
引用 Hal 的来信Hal Finney来源 ↗你好,Satoshi——抱歉今天没能多做一些,看起来我这周会很忙。这次我又在 MSVC 调试器下启动了 0.1.3,如果今晚它再次崩溃,我也许能拿到更多信息。
Hi Satoshi - Sorry I have not been able to do more today, this looks like a busy week for me. I started 0.1.3 again under the MSVC debugger this time so if it crashes tonight I may be able to get some more information.
我现在想起来了,昨晚我的磁盘满了。我下载了一些依赖库(boost 等),打算试着自己编译,而我的磁盘本来就已经很满了。我很确定,这就是导致 0.1.3 崩溃的原因。我附上了 debug.log,里面还包括另外几次运行的记录。错误出现在日志大约三分之一的位置,内容是:
I remember now that last night, my disk filled up. I had downloaded a bunch of the dependencies (boost, etc) with an eye towards trying to build it myself, and my disk was already pretty full. I'm pretty sure this is what caused 0.1.3 to crash. I've attached the debug.log, which also includes some other runs. The error is about 1/3 of the way down and says,
EXCEPTION: NSt8ios_base7failureE CAutoFile::read : end of file
EXCEPTION: NSt8ios_base7failureE CAutoFile::read : end of file
以如今大家使用的磁盘容量来说,正常情况下这种事应该很少发生。
Normally this should be a rare occurrence with the large disk sizes people have today.
Hal
Hal