Bitcointalk

[PATCH] Automatic block validation

中本聪 · 2010 年 8 月 16 日

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

阅读语言
中本聪原话中本聪原帖 ↗

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

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.

中本聪回应

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

This is what I ended up doing in SVN rev 139.

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

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.

来源
Bitcointalk 原始链接 ↗ 记录编号 SN-2469

阅读字号

选择适合你的字号,之后阅读会继续使用。