mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 20:20:00 +01:00
Merge bitcoin/bitcoin#24681: build: Bump libevent minimum version up to 2.1.8
e40779a4ferefactor: Remove outdated libevent logging code (Fabian Jahr)0598f36852refactor: account for requiring libevent 2.1.8+ (fanquake)aaf72d62c1build: Bump libevent minimum version up to 2.1.8 (Hennadii Stepanov) Pull request description: Required to support new functionality in bitcoin/bitcoin#19420. `libevent` availability: https://repology.org/project/libevent/versions ACKs for top commit: laanwj: Code review ACKe40779a4fefanquake: ACKe40779a4feTree-SHA512: ccb14ea2f591484a3df5bc4a19f4f5400ef6b1cfb7dc45dd99f96cb948748215ed3b5debc34869763c91b8c7a26993fdb9b870950c0743c4d01038ab27c5e4e2
This commit is contained in:
@@ -646,17 +646,8 @@ static RPCHelpMan logging()
|
||||
uint32_t changed_log_categories = original_log_categories ^ updated_log_categories;
|
||||
|
||||
// Update libevent logging if BCLog::LIBEVENT has changed.
|
||||
// If the library version doesn't allow it, UpdateHTTPServerLogging() returns false,
|
||||
// in which case we should clear the BCLog::LIBEVENT flag.
|
||||
// Throw an error if the user has explicitly asked to change only the libevent
|
||||
// flag and it failed.
|
||||
if (changed_log_categories & BCLog::LIBEVENT) {
|
||||
if (!UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT))) {
|
||||
LogInstance().DisableCategory(BCLog::LIBEVENT);
|
||||
if (changed_log_categories == BCLog::LIBEVENT) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "libevent logging cannot be updated when using libevent before v2.1.1.");
|
||||
}
|
||||
}
|
||||
UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT));
|
||||
}
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
|
||||
Reference in New Issue
Block a user