Make it possible to determine fee before sending transaction (RPC) #2971

issue mezrin opened this issue on September 4, 2013
  1. mezrin commented at 9:47 AM on September 4, 2013: none

    Due to "https://en.bitcoin.it/wiki/Transaction_fees" there are two types of fees. Logic for the mandatory comission is not so clear. Also it's difficult to check via existing api will whether the mandatory fee be charged or not. So the command to check will whether the mandatory fee be charged or not will be useful.

    Edit: clarified issue title

  2. jonasschnelli commented at 6:36 PM on September 11, 2013: contributor

    might be fixed (half fixed) with #2987. @Mezrin do you talk about RPC (API)? I could also try give some info the RPC response whether the fee was voluntary or not

  3. mezrin commented at 6:59 PM on September 11, 2013: none

    Seems, that your commit generally makes what I meant when creating this issue.

    And yes - I meant RPC API. If you are able to enhance RPC - it will be amazing ) I do not use C++ much, creating new commit will be hard for me.

  4. jonasschnelli commented at 8:12 PM on September 11, 2013: contributor

    The rpc api could of cours be enhanced with that. But now the sendtoaddress (and others) will normally response with a transaction-id. I think we break compatibility if we would give other/more information back.

    Any ideas?

  5. luke-jr commented at 12:31 AM on September 12, 2013: member

    This is solved by #1645 aka #570 aka #557

  6. laanwj closed this on Apr 23, 2014

  7. laanwj commented at 4:01 PM on April 23, 2014: member

    It is not possible to to know in advance whether the 'mandatory fee' will be charged as this depends on the size of the transaction. The size of the transaction, in turn, depends on the output of the coin selection algorithm. This may have changed by the time the 'real' send happens (either due to non-determinism or concurrent threads).

    It would be nice if the raw transactions API provided access to the coin selection and fee determination logic of the wallet. This would make it possible to first construct a transaction, and send it or not dependent on the fee. Right now using the raw transactions API means having to do coin selection yourself.

  8. laanwj reopened this on Apr 23, 2014

  9. laanwj renamed this:
    Add command "will whether the mandatory fee be charged or not"
    Make it possible to determine fee before sending transaction (RPC)
    on Apr 23, 2014
  10. laanwj commented at 6:22 PM on May 2, 2014: member

    See also #3794

  11. laanwj added the label Wallet on May 2, 2014
  12. laanwj commented at 4:45 PM on February 9, 2016: member

    It would be nice if the raw transactions API provided access to the coin selection and fee determination logic of the wallet.

    This has become possible with fundrawtransaction.

  13. laanwj closed this on Feb 9, 2016

  14. Bushstar referenced this in commit d8df05b955 on Apr 8, 2020
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me