rpc: remove info about mallocinfo needing glibc 2.10+

We require glibc 2.18+.
This commit is contained in:
fanquake 2021-12-01 19:18:26 +08:00
parent 205877e55f
commit 9a09d307e9
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
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")