wallet: rpc: settxfee sets the wallet feerate not fee #31088

issue ismaelsadeeq openend this issue on October 14, 2024
  1. ismaelsadeeq commented at 9:03 pm on October 14, 2024: member

    The wallet RPC settxfee sets the fee rate for a wallet.

    Current help text:

    0Set the transaction fee rate in BTC/kvB for this wallet. Overrides the global -paytxfee command line parameter.
    1Can be deactivated by passing 0 as the fee. In that case automatic fee selection will be used by default.
    2
    3Arguments:
    41. amount    (numeric or string, required) The transaction fee rate in BTC/kvB
    5
    6Result:
    7true|false    (boolean) Returns true if successful
    

    This is a misnomer, as stated here #29278 (review) so should instead be setfeerate @jonatack suggested a safer approach to avoid breaking things

    (see: #20484 (comment)). I think this is better approach than just renaming the settxfee RPC to setfeerate?

    • Add setfeerate RPC which is a mirror of settxfee but in sat/vB.
    • Keep settxfee hidden, but prefer the setfeerate RPC in future use.
    • Eventually deprecate settxfee.

    This issue is limited to fixing the ambiguity in settxfee.

  2. maflcko commented at 9:38 am on October 15, 2024: member
    In theory, it would be possible to register RPC argument name aliases, IIRC. They are denoted and split by |.
  3. maflcko added the label Wallet on Oct 15, 2024
  4. maflcko added the label RPC/REST/ZMQ on Oct 15, 2024
  5. maflcko commented at 11:51 am on November 29, 2024: member

    On a greater scope, I wonder if it is a good approach to one-by-one deprecate one unit and add another.

    If the goal is to only support one unit, it would be better to adjust all places to return that unit, so that it can be used in round-trips. Otherwise, users will have to convert values they receive from the RPC to pass them to another RPC of the same program.


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: 2024-12-03 15:12 UTC

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