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

Return fee in getrawtransaction #23264

Closed
maflcko opened this issue Oct 12, 2021 · 6 comments · Fixed by #23319
Closed

Return fee in getrawtransaction #23264

maflcko opened this issue Oct 12, 2021 · 6 comments · Fixed by #23319

Comments

@maflcko
Copy link
Member

maflcko commented Oct 12, 2021

Similar to how the fee is returned in getblock (#18771), it should be returned in getrawtransaction.

Useful skills:

Understanding of undo data, the RPC interface and the functional tests.

Want to work on this issue?

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

@KenCox94
Copy link

I'd love to take a look at this.

@meshcollider
Copy link
Contributor

@KenCox94 if you need any pointers, please don't hesitate to ask here or on IRC #bitcoin-core-dev :)

@dougEfresh
Copy link
Contributor

I'd love to take a look at this.

@KenCox94 I have a draft working solution. If you haven't already started, I would like to submit my PR.

@KenCox94
Copy link

Sure!

@viniciusdepadua
Copy link

Is this issue still open? Could I help?

@fanquake
Copy link
Member

fanquake commented Nov 6, 2021

This is being worked on in #23319. You could help by reviewing that PR.

@bitcoin bitcoin deleted a comment from Mdasgor Nov 7, 2021
@bitcoin bitcoin deleted a comment from PATOOCTOBER15 Nov 9, 2021
@bitcoin bitcoin deleted a comment Nov 23, 2021
@bitcoin bitcoin deleted a comment Nov 23, 2021
@bitcoin bitcoin deleted a comment Nov 23, 2021
@bitcoin bitcoin deleted a comment from TeresaHodges764 Mar 10, 2022
@bitcoin bitcoin deleted a comment from wangzemchd Mar 10, 2022
achow101 added a commit that referenced this issue Dec 13, 2022
f866971 rpc: Return fee and prevout(s) to getrawtransaction (Douglas Chimento)

Pull request description:

  Add fee response in BTC to getrawtransaction #23264

  ### For Reviewers

  * Verbose arg is now an int
  * Verbose = 2 includes a `fee` field and `prevout`
  * [./test/functional/rpc_rawtransaction.py](./test/functional/rpc_rawtransaction.py) contains a new test to validate fields of new verbosity 2 (not the values)

  ```
  bitcoin-cli -chain=test getrawtransaction 9ae533f7da9be4a34997db78343a8d8d6d6186b6bba3959e56f416a5c70e7de4 2 000000000000001d442e556146d5f2841d85150c200e8d8b8a4b5005b13878f6
  ```
  ```
    "in_active_chain": true,
    "txid": "9ae533f7da9be4a34997db78343a8d8d6d6186b6bba3959e56f416a5c70e7de4",
    "hash": "7f23e3f3a0a256ddea1d35ffd43e9afdd67cc68389ef1a804bb20c76abd6863e",
   ....
    "vin": [
      {
        "txid": "23fc75d6d74f6f97e225839af69ff36a612fe04db58a4414ec4828d1749a05a0",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "prevout": {
          "generated": false,
          "height": 2099486,
          "value": 0.00017764,
          "scriptPubKey": {
            "asm": "0 7846ce1ced3253d8bd43008db2ca364cc722f5a2",
            "hex": "00147846ce1ced3253d8bd43008db2ca364cc722f5a2",
            "address": "tb1q0prvu88dxffa302rqzxm9j3kfnrj9adzk49mlp",
            "type": "witness_v0_keyhash"
          }
        },
        "sequence": 4294967295
      },
  ...
   "fee": 0.00000762
  }
  ```

ACKs for top commit:
  achow101:
    ACK f866971
  aureleoules:
    ACK f866971
  hernanmarino:
    re ACK f866971
  pablomartin4btc:
    re-tACK f866971

Tree-SHA512: 591fdc285d74fa7803e04ad01c7b70bc20fac6b1369e7bd5b8e2cde9b750ea52d6c70d79225b74bef4f4bbc0fb960877778017184e146119da4a55f9593d1224
@bitcoin bitcoin locked and limited conversation to collaborators Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@fanquake @dougEfresh @meshcollider @maflcko @KenCox94 @viniciusdepadua and others