原始文献 / 论坛帖 / Re: CLI bitcoin generation
Re: CLI bitcoin generation
Bitcointalk · 2010-05-26 20:09:34 UTC
引用 molybdenum(May 22, 2010, 06:44:20 PM)(https://bitcointalk.org/index.php?topic=145.msg1194#msg1194):
加个可选参数,指定那笔交易之后最少经过多少个区块(getallreceived 1 是当前行为,或者就 getallreceived;偏执的用 getallreceived 5,想要即时确认的用 getallreceived 0)?
对,其实就是这个意思。getallreceived 0 就能达到你要的效果。(现在它改名叫 listreceivedbyaddress 0)默认是 1 个确认,但我觉得现实中大多数数字商品和服务 0 确认就行。就像你说的,如果需要 0 个以上的确认,可以同时显示两个数:未确认和可用余额,这样他们立刻就能看到交易过去了。
listreceivedbyaddress [minconf=1] [includeempty=false]
[minconf] 是付款计入之前的最小确认数。
[includeempty] 是否包含没收到过付款的地址。
返回一个对象数组,包含:
"address" : 收款地址
"label" : 收款地址的 label
"amount" : 该地址收到的总额
"confirmations" : 计入的最近一笔交易的确认数
如果用用户名给地址打 label,就用 listreceivedbylabel。
目前我主要在做给 web 商家用的函数,无头(headless)挖矿机的远程管理功能还没怎么顾上。
英文原文
Quote from: molybdenum on May 22, 2010, 06:44:20 PM(https://bitcointalk.org/index.php?topic=145.msg1194#msg1194):
> 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.
