Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amount/fee display for coinbase transactions is not user-friendly #961

Open
cmihai opened this issue Apr 12, 2019 · 2 comments
Open

Amount/fee display for coinbase transactions is not user-friendly #961

cmihai opened this issue Apr 12, 2019 · 2 comments
Assignees
Labels
bug A problem of existing functionality
Milestone

Comments

@cmihai
Copy link
Member

cmihai commented Apr 12, 2019

Describe the bug
When calling gettransaction on a coinbase transaction, the result looks like:

gettransaction 31311af5c831b38a1498f71ec870c1ed36c4c030463709067a08ed8df5ecc8b3
10:51:31
{
  "amount": -3.74999999,
  "bip125-replaceable": "no",
  "blockhash": "85b494203985bcbf5a0d8d9e840988c34091bf09c1f0b8bd42ce84c656e4b951",
  "blockindex": 0,
  "blocktime": 1555058872,
  "confirmations": 9,
  "details": [],
  "fee": 3.74999999,
  "generated": true,
  "hex": "010001000001020000000000000000000000000000000000000000000000000000000000000000000000002402cd00202f24abbab39267b916b77f1f39e0a62f5134402a0026ca8f5f6d0e2ec2fb4884ffffffffd360d5e63a98ff4a10b32874a0a1a1a2c8d1422bd4f5ffbb03d4c423c277a1360100000000ffffffff02bf0b5a16000000001600142176bae014a27bb24903db14aa43afd9bff1f6470080c6a47e8d03001600142176bae014a27bb24903db14aa43afd9bff1f6470002483045022100f92276eefca1d8709f9ddd113508d49e5e4822883412cfbd458da5fb50ce2d2a0220663d4e332bffa3675fb79801497d8af54cca50d53adc8be6185abd31cfb04fde012102c8d61f0af45c20a90a43fceaaa2f65bf05a4417ea3347c65225d4a1639f09d4300000000",
  "time": 1555058868,
  "timereceived": 1555058868,
  "txid": "31311af5c831b38a1498f71ec870c1ed36c4c030463709067a08ed8df5ecc8b3",
  "walletconflicts": []
}

Note the negative "amount" and the positive "fee". While there is some internal logic to it ('amount' being the sum we spent, and if we actually gained money, then that number is negative; 'fee' being the negative sum we paid to the miner, and if we mined the block, then the fee is positive), it's confusing. Likewise, filtertransaction adds the amount and the fee, and displays zero for coinbase transactions, so, in the GUI wallet, you see a row of 0-UTE transactions.

To Reproduce
Steps to reproduce the behavior:

  1. Start the node (optionally, the GUI wallet)
  2. Wait until a few blocks are mined.
  3. Inspect the coinbase transactions, either with gettransaction, filtertransactions or in the GUI wallet.

Expected behavior
The shown amounts for coinbase transactions should be positive and equal to the block reward + fees. The "fee" field should be zero.

@cmihai cmihai added the bug A problem of existing functionality label Apr 12, 2019
@cmihai cmihai self-assigned this Apr 12, 2019
@thothd thothd added this to the 0.1 milestone Apr 12, 2019
@Nizametdinov
Copy link
Member

There is also related issue #779.

@cmihai
Copy link
Member Author

cmihai commented Apr 12, 2019

Thanks, I'll close them both when I fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants