aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-10-11 23:14:27 +0900
committerJohn Newbery <john@johnnewbery.com>2018-10-18 17:46:48 -0400
commitc9f02955b2e9062808a9455c4ee7d52cf401eef5 (patch)
tree0b111c518e15bd3295c4d0ba29e7210db8e05b24 /src
parentaab81720de237b258ed4e15f1b1831c11abf74f0 (diff)
[wallet] Deprecate the generate RPC method
Diffstat (limited to 'src')
-rw-r--r--src/wallet/rpcwallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index df10fb48cc..9827e025c2 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3289,6 +3289,12 @@ UniValue generate(const JSONRPCRequest& request)
);
}
+ if (!IsDeprecatedRPCEnabled("generate")) {
+ throw JSONRPCError(RPC_METHOD_DEPRECATED, "The wallet generate rpc method is deprecated and will be fully removed in v0.19. "
+ "To use generate in v0.18, restart bitcoind with -deprecatedrpc=generate.\n"
+ "Clients should transition to using the node rpc method generatetoaddress\n");
+ }
+
int num_generate = request.params[0].get_int();
uint64_t max_tries = 1000000;
if (!request.params[1].isNull()) {