LearnBitcoin

Bitcoin Dev Archive 2011

Listing of generation transactions

2 messages, 15 Jul 2011. Started by Stéphane Gimenez.

Stéphane Gimenez (2)

Permalink Original thread on gnusha.org

Stéphane Gimenez permalink original

Hello all,

After reading pull/417, I'm noticing that generation transactions always appear twice in listtransaction output:

 * one item with account "" and category "generate"/"imature"/"orphan",
   plus some transaction data.
 * one with the account associated to the destination address and
   category "received", plus the same transaction data.

Both items have the same txid.

Is this the intended behavior or should the second be removed?

Also, why is account "" enforced in the first item? (Wrong assumption that coinbase is always built from the client itself?).

Last, it happens that {list,get}receivedby{address,account} commands never list or take into account generation transactions. I'm not sure how the help message associated to those commands should be understood. As a user, I would assume that generated transaction are included in these listings/amounts.

Is all this related with some issues encountered by E-wallet providers?

Thanks, Stéphane

Stéphane Gimenez in reply to Stéphane Gimenez permalink original
Quoted text (8 lines)
> After reading pull/417, I'm noticing that generation transactions
> always appear twice in listtransaction output:
>
>  * one item with account "" and category "generate"/"imature"/"orphan",
>    plus some transaction data.
>
>  * one with the account associated to the destination address and
>    category "received", plus the same transaction data.

Sorry! the item duplication was due to the pull. (very stupid me)

The issue with account "" remains.

For coinbase transactions, we may list one "generated" item per txout that corresponds to an owned address. Accounts would be associated accordingly, in the same way as for usual "received" amounts. Account balances would also take into account these generated amounts in the obvious way.

Would that be ok? I think few people rely on these specific details, and they would be happy with such a change. Moreover, this would actually simplify the code a little bit.

Quoted text (8 lines)
> Last, it happens that {list,get}receivedby{address,account} commands
> never list or take into account generation transactions. I'm not sure
> how the help message associated to those commands should be
> understood. As a user, I would assume that generated transaction are
> included in these listings/amounts.
>
> Is all this related with some issues encountered by E-wallet
> providers?