Bitcointalk · Bitcoin crash when sending coins

中本聪,2010 年 1 月 27 日

SN-0100 已核对来源,附原文与上下文。

阅读语言
中文译文

到处复制钱包文件,就会出现这种情况。倘若你把钱包文件复制到第二台电脑,两台机器都会以为钱包里的钱是自己的。一台花掉了其中一些,另一台却并不知道这些硬币已被花掉,便会试图再花一次——你碰到的,就是这个错误。

既然现在明确了这是条关键错误信息,它应该写成类似"这笔钱似乎已被花掉……如果你在另一台电脑上使用过钱包文件的副本,就可能发生这种情况。"

你可以移动或备份钱包文件,但它只能有一条"血脉",同一时间只能在一处使用。一旦把钱转出去,便不能再使用任何先前的副本。

这引出了一个好问题。对于恢复一份可能早于某次花钱之前的备份的情况,我们需要加上重新同步的功能,找出哪些硬币已被花掉。这不难做,只是还没实现。我加进清单了。有了它,多数情况下能直接修好,而不是抛出那条错误信息。

ORIGINAL · 英文原文
That is what happens if you copy wallet files around.  If you copy your wallet file to a second computer, then they both think the money in the wallet is theirs.  If one spends any of it, the other doesn't know those coins are already spent and would try to spend them again, and that's the error you would hit.

Now that it's clear this is a key error message, it ought to be something more like "the money appears to be already spent...  this could happen if you used a copy of your wallet file on another computer."

You can move or backup your wallet file, but it needs to have only one "lineage" and only used in one place at a time.  Any time you transfer money out of it, then you must no longer use any previous copies.

This brings up a good point.  In the case of restoring a backup that may be from before you spent some coins, we need to add functionality to resync it to discover which coins have already been spent.  This would not be hard to do, it just hasn't been implemented yet.  I'll add it to the list.  This would make it mostly repair the situation instead of giving that error message.
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0100