Skip to content

回复:我弄坏了钱包,现在发送的交易一直无法确认 ​

原始发布页

打开来源页面
查看 1 个交叉存档

正如你已经发现的,根本问题在于,交易至少获得 1 次确认之前,我们不应将它计入或花费。0 次确认/未确认交易在很大程度上是二等公民。它们至多只是表明收到了某些东西的提示,但把它们计入余额或花掉还为时过早。

我做了修改,让它们以较浅的文字显示,入账金额用方括号括起来,例如 [+1.23],并且该金额不计入你的余额,也不能花费。这不适用于你发出的交易,因为交易是你写入的,所以你默认信任它们。

我没有把它写成 (+1.23),因为在会计记法中,圆括号表示负数。我希望方括号与它有足够明显的区别,能让人清楚它的含义。

如果 JSON-RPC 接口愿意,它仍然可以通过指定 0 次确认来查看 0 次确认/未确认交易。

我已将这些改动上传到 SVN 修订版 158。我很快会发布 0.3.13 RC。

如果你的钱包中有任何这类交易,在升级到即将发布的 0.3.13 之前,请不要发送任何付款。

如果你已经发送过任何这类交易,或者你是它们的创建者,那么请使用 theymos 的补丁,或者做以下修改,并用它把你的干净交易发送到一个新钱包中,把事情清理干净。

修改: if (pcoin->GetDepthInMainChain() < 1 && pcoin->GetDebit() <= 0) continue; 为: if (pcoin->GetDepthInMainChain() < 1) continue;

英文原文 ​

展开英文原文

As you figured out, the root problem is we shouldn't be counting or spending transactions until they have at least 1 confirmation. 0/unconfirmed transactions are very much second class citizens. At most, they are advice that something has been received, but counting them as balance or spending them is premature.

I made changes so they show up in lighter print, with the credit amount in square brackets like [+1.23], and the amount not counted towards your balance and not available for spending. This doesn't apply to transactions you sent, which you implicitly trust, since you wrote them.

I didn't make it (+1.23) because parenthesis in accounting means negative. I hope square brackets is different enough to be clear what is meant.

The JSON-RPC interface can still see 0/unconfirmed if it wants by specifying 0 confirmations.

I uploaded the changes to SVN rev 158. I will post a 0.3.13 RC shortly.

If you have any of these transactions in your wallet, do not send any payments until you've upgraded to 0.3.13, which will be coming soon.

If you've already sent any of these transactions, or you're the creator of them, then use theymos' patch or make the following change and use it to send your clean transactions to a new wallet to clean things up.

change: if (pcoin->GetDepthInMainChain() < 1 && pcoin->GetDebit() <= 0) continue; to: if (pcoin->GetDepthInMainChain() < 1) continue;

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。