Bitcointalk · Source code documentation

中本聪,2010 年 7 月 16 日

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

阅读语言
中文译文

在 init.cpp。

这是个 wxWidgets 应用,所以没有 main() 函数。不久之后也许就有了,因为我离让 bitcoind 不依赖 wxBase 编译已经很近了。(到时候会放在 init.cpp)

我把文件命名成 "main.cpp",抱歉,当时另一个可选名字是 "core.cpp"。现在改太迟了。不过我还是更喜欢 main.cpp。

我们仍然非常缺示例代码,展示使用 JSON-RPC 函数的推荐方式,比如给一个典型的 storefront 网站做基本的账户系统。用 getreceivedbylabel、以用户名做 label,账户存的地址被用过之后就换一个新比特币地址。我在论坛某个地方贴过一段示例代码片段。(搜 getreceivedbylabel 或 getnewaddress)示例代码可以是一个最普通不过的银行网站,可以存款、可以付款。

ORIGINAL · 英文原文
It's in init.cpp.

It's a wxWidgets app, so it doesn't have a main() function.  It may in a little while, since I'm pretty close to making bitcoind build w/o wxBase.  (it'll be in init.cpp)

Sorry about my choice of the filename "main.cpp", another possible name would have been "core.cpp".  It's much too late to change.  I still prefer main.cpp.

We're still in great need of sample code showing the recommended way to use the JSON-RPC functions, like for a basic account system on a typical storefront website.  Using getreceivedbylabel using the username as the label, changing to a new bitcoin address once the stored one for that account gets used.  I posted a sample code fragment on the forum somewhere.  (search on getreceivedbylabel or getnewaddress)  The sample code could be a plain vanilla bank site where you can deposit and send payments.
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-1271