Bitcointalk · [PATCH] Automatic block validation

中本聪,2010 年 8 月 16 日

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

阅读语言
中文译文

兴许可以在检查之后主动发起 AddToBlockIndex 或 Reorganize,但那需要更细致的推敲。我大抵应该把 AddToBlockIndex 里设置新区块最佳的部分拆出来。我最后很可能用那个做法,而非下面的代码。

这就是我最后在 SVN rev 139 里做的。

我没有删坏链,而是给 ConnectBlock 加了一个额外的 CheckBlock,如此这般坏区块一旦被踢出去就回不到最佳链了。

ORIGINAL · 英文原文
It would probably be possible to initiate an AddToBlockIndex or Reorganize after the check, but it would require a lot more careful attention.  I probably should break out part of AddToBlockIndex that sets the new best block.  I'll probably end up doing that instead of the code below.
This is what I ended up doing in SVN rev 139.

Instead of deleting the bad chain, I added an extra CheckBlock to ConnectBlock so bad blocks can't get back into the best chain once they're kicked out.
上下文
← 上一条 SN-2469 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-2469