Skip to content

allow RPC send commands to specify TX fee per TX #210

@mikegogulski

Description

@mikegogulski

bitcoin@btcserver:~/bitcoin-0.3.21/bin/32$ ./bitcoind sendtoaddress 16bRQcbr1xxxu27ZQxqGhi242eL 0.2
error: {"code":-4,"message":"Error: This transaction requires a transaction fee of at least 0.01 because of its amount, complexity, or use of recently received funds "}

I guess in the first place I'd like an error message which comes back with a "TXFEEREQUIRED" status, giving that fee as its value, rather than needing to parse English text to find it.

In the second place, I'd like to be able to do something like:

try {
  rpc_bitcoind("sendtoaddress", address, amount);
} catch (bitcoindexception e) {
  if (e->txfee) {
    try {
      rpc_bitcoind("sendtoaddress", address, amount, e->txfee);
    } catch {
      debug("zomgwtflolbbq");
    }
  } else {
    debug("fail", e.toString());
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions