Skip to content

回复:警报系统的开发 ​

原始发布页

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

引用 nelisky 于 2010年8月25日 01:28:32 AM 的发言

那么管理员会从 bitcoind 收到什么样的警告?debug.log 中是否有我们可以用 grep 查找的内容?还是说 rpc 调用会抛出某种特定错误?有没有办法在本地强制触发这种情况,以便对服务进行单元测试?

getinfo 有一个新字段,会显示任何警报消息或其他原本会显示在状态栏上的错误。

这些 rpc 方法会返回一个 json-rpc 错误,其错误描述为“Safe mode: ”,后面跟着警报指定的附加文本。

我为你添加了“-testsafemode”开关。SVN 修订版 145。

这些东西非常新,可能仍会发生变化。

引用 mizerydearia 于 2010年8月25日 12:11:50 AM 的发言

我刚发现 http://www.bitcoin.org/wiki/doku.php?id=man_page,但没有看到任何对 -disablesafemode 的说明。也许应该加上!另外,像 -4way 这样的其他开关也应该加上。

许多开关是有意不写进文档的,比如它们的功能仍在开发中,或者我还没有确定它们的名称,又或者只是并非用于发布的测试代码。

-4way 最终应该由自动检测取代。

英文原文 ​

展开英文原文

Quote from: nelisky on August 25, 2010, 01:28:32 AM

So what kind of warning do admins get from bitcoind? Is there something we can grep from debug.log? Or will rpc calls raise some specific error? Is there a way to locally force this to happen, for unittesting services?

getinfo has a new field that shows any alert messages or other errors that would be displayed on the status bar.

The rpc methods return a json-rpc error with the error description "Safe mode: " followed by additional text specified by the alert.

I added the switch "-testsafemode" for you. SVN rev 145.

This stuff is very new and may still be subject to change.

Quote from: mizerydearia on August 25, 2010, 12:11:50 AM

I just discovered http://www.bitcoin.org/wiki/doku.php?id=man_page and don't see any reference to -disablesafemode. Perhaps it should be added! Also others liek -4way should be added as well.

Many switches are intentionally undocumented, like if their functionality is still under construction or I haven't settled on their name yet, or just test code not intended for release.

-4way should eventually be replaced by an auto-detect.

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