Skip to content

回复:通过 CLI 生成比特币 ​

原始发布页

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

引用 molybdenum 于 2010年5月22日 06:44:20 PM 的发言

是否可以用一个可选参数来指定该交易之后所需的最少区块数(getallreceived 1 表示当前行为,或者只用 getallreceived;多疑的人用 getallreceived 5;即时确认用 getallreceived 0)?

是的,实际上就是这样。getallreceived 0 应该能做到你想要的效果。(现在它已改名为 listreceivedbyaddress 0)默认值是 1 次确认,但我认为实际上大多数数字商品和服务可以使用 0 次确认。就像你说的,如果你需要 0 次以上的确认,可以显示两个数字:未确认余额和可用余额,这样他们马上就能看到自己的交易已经成功了。

listreceivedbyaddress [minconf=1] [includeempty=false] [minconf] 是把付款计入之前所需的最少确认次数。 [includeempty] 表示是否包含尚未收到任何付款的地址。 返回一个对象数组,其中包含: "address" : 收款地址 "label" : 收款地址的标签 "amount" : 该地址收到的总金额 "confirmations" : 所包含的最新交易的确认次数

如果你用用户名给地址加标签,也可以使用 listreceivedbylabel。

到目前为止,我主要专注于面向网络商家的函数,还没有太多关注用于远程管理无界面新币生成器的功能。

英文原文 ​

展开英文原文

Quote from: molybdenum on May 22, 2010, 06:44:20 PM

An optional parameter to specify the minimum number of blocks after that transaction (getallreceived 1 for current behavior, or just getallreceived, getallreceived 5 for the paranoid, getallreceived 0 for instant confirms)?

Yeah, that actually is what it is. getallreceived 0 should do what you want. (now it's renamed to listreceivedbyaddress 0) The default is 1 confirmation, but I think in reality most digital goods and services can be 0 confirmations. Like you say, if you need more than 0 confirmations, you could show two numbers, unconfirmed and available balance, so they immediately see their transaction went through.

listreceivedbyaddress [minconf=1] [includeempty=false] [minconf] is the minimum number of confirmations before payments are included. [includeempty] whether to include addresses that haven't received any payments. Returns an array of objects containing: "address" : receiving address "label" : the label of the receiving address "amount" : total amount received by the address "confirmations" : number of confirmations of the most recent transaction included

or listreceivedbylabel if you're labelling addresses with their username.

So far I've concentrated on functions for web merchants, not so much on stuff for remote management of headless coin generators yet.

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