原始文献 / 论坛帖 / Re: Development of alert system

Re: Development of alert system

Bitcointalk · 2010-08-25 17:59:30 UTC

AuthorSatoshi Nakamoto
TitleRe: Development of alert system
Date2010-08-25 17:59:30 UTC
ForumBitcointalk · 原文

引用自 nelisky,发表于 August 25, 2010, 01:28:32 AM(https://bitcointalk.org/index.php?topic=898.msg11092#msg11092)

那么管理员能从 bitcoind 得到什么样的警告?能从 debug.log 里 grep 到什么吗?或者 rpc 调用会抛出某种特定错误?有没有办法在本地强制触发,用来给服务做单元测试?

getinfo 新增了一个字段,会显示状态栏上显示的任何警报信息或其他错误。

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

我为你加了 "-testsafemode" 开关。SVN rev 145。

这些都很新,还可能变动。

引用自 mizerydearia,发表于 August 25, 2010, 12:11:50 AM(https://bitcointalk.org/index.php?topic=898.msg11079#msg11079)

我刚发现 http://www.bitcoin.org/wiki/doku.php?id=man_page,上面没有 -disablesafemode 的说明。也许应该加上!还有 -4way 之类的也应该加上。

很多开关是故意不写文档的,比如功能还在开发中、名字还没定,或者只是测试代码,不打算发布。

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

英文原文

Quote from: nelisky on August 25, 2010, 01:28:32 AM(https://bitcointalk.org/index.php?topic=898.msg11092#msg11092)

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(https://bitcointalk.org/index.php?topic=898.msg11079#msg11079)

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.