Closed cmihai closed 5 years ago
Although I understand the spirit of the change, I'm not sure about changing the meaning of the "amount"
field for coinbase transactions. I would prefer to add fields like "reward"
, "collected_fees"
& "used_stake"
that only appears for them, and remove the "amount"
field.
Although I understand the spirit of the change, I'm not sure about changing the meaning of the "amount" field for coinbase transactions. I would prefer to add fields like "reward", "collected_fees" & "used_stake" that only appears for them, and remove the "amount" field.
@castarco that's a good idea, but it's not a one-line change since 1) for now, filtertransactions
only deals with a transaction's outputs, and the stake is an input, and 2) the block reward and the fees are combined into the first output. Let's first have the RPC output make some kind of sense to the client, and then we can add new fields.
This commit cherry-picks the
GetAmount
changes from #811 and fixes thefiltertransactions
RPC output for coinbase transactions, setting the "fee" field to zero and "amount" to the reward received by the miner. Previously, as a side-effect of the algorithm, it was the other way around.See also #779 and #961.