aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/client.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-11-04 13:13:17 +0100
committerJon Atack <jon@atack.com>2020-11-11 15:55:59 +0100
commita0d495747320c79b27a83c216dcc526ac8df8f24 (patch)
tree1d662469632dc37850ff4b5bd9a9e04566f8e78a /src/rpc/client.cpp
parente21212f01b7c41eba13b0479b252053cf482bc1f (diff)
downloadbitcoin-a0d495747320c79b27a83c216dcc526ac8df8f24.tar.xz
wallet: introduce fee_rate (sat/vB) param/option
Create a fee_rate (sat/vB) RPC param and replace overloading the conf_target and estimate_mode params in the following 6 RPCs with it: - sendtoaddress - sendmany - send - fundrawtransaction - walletcreatefundedpsbt - bumpfee In RPC bumpfee, the previously existing fee_rate remains but the unit is changed from BTC/kvB to sat/vB. This is a breaking change, but it should not be an overly risky one, as the units change by a factor of 1e5 and any fees specified in BTC/kvB after this commit will either be too low and raise an error or be 1 sat/vB and can be RBFed. Update the test coverage for each RPC. Co-authored-by: Murch <murch@murch.one>
Diffstat (limited to 'src/rpc/client.cpp')
-rw-r--r--src/rpc/client.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index 88c8ebe1f6..042005b9a6 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -41,7 +41,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "sendtoaddress", 5 , "replaceable" },
{ "sendtoaddress", 6 , "conf_target" },
{ "sendtoaddress", 8, "avoid_reuse" },
- { "sendtoaddress", 9, "verbose"},
+ { "sendtoaddress", 9, "fee_rate"},
+ { "sendtoaddress", 10, "verbose"},
{ "settxfee", 0, "amount" },
{ "sethdseed", 0, "newkeypool" },
{ "getreceivedbyaddress", 1, "minconf" },
@@ -73,7 +74,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "sendmany", 4, "subtractfeefrom" },
{ "sendmany", 5 , "replaceable" },
{ "sendmany", 6 , "conf_target" },
- { "sendmany", 8, "verbose" },
+ { "sendmany", 8, "fee_rate"},
+ { "sendmany", 9, "verbose" },
{ "deriveaddresses", 1, "range" },
{ "scantxoutset", 1, "scanobjects" },
{ "addmultisigaddress", 0, "nrequired" },
@@ -129,7 +131,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "lockunspent", 1, "transactions" },
{ "send", 0, "outputs" },
{ "send", 1, "conf_target" },
- { "send", 3, "options" },
+ { "send", 3, "fee_rate"},
+ { "send", 4, "options" },
{ "importprivkey", 2, "rescan" },
{ "importaddress", 2, "rescan" },
{ "importaddress", 3, "p2sh" },