Merge bitcoin/bitcoin#23643: rpc: remove info about mallocinfo needing glibc 2.10+

9a09d307e9 rpc: remove info about mallocinfo needing glibc 2.10+ (fanquake)

Pull request description:

  We require glibc 2.18+.

ACKs for top commit:
  jarolrod:
    ACK 9a09d307e9
  shaavan:
    ACK 9a09d307e9

Tree-SHA512: 61312e48fda4cb4c788d44be0f0c626e753b0a18a8f36bca813ce838f8e619e73c00306bb716e9863a077c09b5bcdec7dec134d75c5ace719a5c0a05cf75ed8a
This commit is contained in:
MarcoFalke 2021-12-02 08:31:47 +01:00
commit a377510e3a
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
2 changed files with 2 additions and 2 deletions

View File

@ -558,7 +558,7 @@ static RPCHelpMan getmemoryinfo()
#ifdef HAVE_MALLOC_INFO
return RPCMallocInfo();
#else
throw JSONRPCError(RPC_INVALID_PARAMETER, "mallocinfo is only available when compiled with glibc 2.10+");
throw JSONRPCError(RPC_INVALID_PARAMETER, "mallocinfo mode not available");
#endif
} else {
throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown mode " + mode);

View File

@ -50,7 +50,7 @@ class RpcMiscTest(BitcoinTestFramework):
assert_equal(tree.tag, 'malloc')
except JSONRPCException:
self.log.info('getmemoryinfo(mode="mallocinfo") not available')
assert_raises_rpc_error(-8, 'mallocinfo is only available when compiled with glibc 2.10+', node.getmemoryinfo, mode="mallocinfo")
assert_raises_rpc_error(-8, 'mallocinfo mode not available', node.getmemoryinfo, mode="mallocinfo")
assert_raises_rpc_error(-8, "unknown mode foobar", node.getmemoryinfo, mode="foobar")