diff options
author | fanquake <fanquake@gmail.com> | 2023-09-12 14:08:33 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-09-12 14:26:57 +0100 |
commit | 578f50fc480a5a9028a7e482b1241f2dd2f8eb45 (patch) | |
tree | e6d97e490deaa31e05ab0b8c4bdb62e05bbea5e7 /src | |
parent | fd69ffbbfb3e08b474b33540e56cf4f81e5c21d4 (diff) | |
parent | 971bae9174293b79f1f29822d662b31a2ba62234 (diff) | |
download | bitcoin-578f50fc480a5a9028a7e482b1241f2dd2f8eb45.tar.xz |
Merge bitcoin/bitcoin#28448: rpc: Deprecate rpcserialversion=0
971bae9174293b79f1f29822d662b31a2ba62234 rpc: Deprecate rpcserialversion=0 (Anthony Towns)
Pull request description:
This option was introduced in #9194 to ease the transition to segwit; now that most libraries and apps have been updated it should no longer be necessary.
ACKs for top commit:
MarcoFalke:
review ACK 971bae9174293b79f1f29822d662b31a2ba62234
Randy808:
Code Review ACK 971bae9174293b79f1f29822d662b31a2ba62234
glozow:
ACK 971bae9174293b79f1f29822d662b31a2ba62234, seems appropriate to remove. Thanks for looking at usage in https://github.com/bitcoin/bitcoin/pull/28448#issuecomment-1714699556
Tree-SHA512: 6880314504281e9d7c288bd159f8cadefb3e653ac2dd148396810f7f5a27ba352ecfe720eb2dbc6172b57820cb9a2a254dcb2585881abae43811013505f0e09a
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index f0847bd4f7..c025fb8ed8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -618,7 +618,7 @@ void SetupServerArgs(ArgsManager& argsman) argsman.AddArg("-rpccookiefile=<loc>", "Location of the auth cookie. Relative paths will be prefixed by a net-specific datadir location. (default: data dir)", ArgsManager::ALLOW_ANY, OptionsCategory::RPC); argsman.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::RPC); argsman.AddArg("-rpcport=<port>", strprintf("Listen for JSON-RPC connections on <port> (default: %u, testnet: %u, signet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), signetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::RPC); - argsman.AddArg("-rpcserialversion", strprintf("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)", DEFAULT_RPC_SERIALIZE_VERSION), ArgsManager::ALLOW_ANY, OptionsCategory::RPC); + argsman.AddArg("-rpcserialversion", strprintf("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) (DEPRECATED) or segwit(1) (default: %d)", DEFAULT_RPC_SERIALIZE_VERSION), ArgsManager::ALLOW_ANY, OptionsCategory::RPC); argsman.AddArg("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::RPC); argsman.AddArg("-rpcthreads=<n>", strprintf("Set the number of threads to service RPC calls (default: %d)", DEFAULT_HTTP_THREADS), ArgsManager::ALLOW_ANY, OptionsCategory::RPC); argsman.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::RPC); @@ -988,6 +988,10 @@ bool AppInitParameterInteraction(const ArgsManager& args) if (args.GetIntArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) > 1) return InitError(Untranslated("Unknown rpcserialversion requested.")); + if (args.GetIntArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) == 0 && !IsDeprecatedRPCEnabled("serialversion")) { + return InitError(Untranslated("-rpcserialversion=0 is deprecated and will be removed in the future. Specify -deprecatedrpc=serialversion to allow anyway.")); + } + // Also report errors from parsing before daemonization { kernel::Notifications notifications{}; |