diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-10-03 16:26:30 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-12-07 11:06:16 +0100 |
commit | fa6e50d6c79633e22ad4cfc75f56aaa40112ecbb (patch) | |
tree | b2c87df64cea63eeeccadc338191fb05e8d2adc3 /src | |
parent | faa48388bca06df1ca7ab92461b76a6720481e45 (diff) |
fuzz: Use C++20 starts_with in rpc.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/rpc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/fuzz/rpc.cpp b/src/test/fuzz/rpc.cpp index 2189dc0067..2325bf0941 100644 --- a/src/test/fuzz/rpc.cpp +++ b/src/test/fuzz/rpc.cpp @@ -380,9 +380,7 @@ FUZZ_TARGET(rpc, .init = initialize_rpc) rpc_testing_setup->CallRPC(rpc_command, arguments); } catch (const UniValue& json_rpc_error) { const std::string error_msg{json_rpc_error.find_value("message").get_str()}; - // Once c++20 is allowed, starts_with can be used. - // if (error_msg.starts_with("Internal bug detected")) { - if (0 == error_msg.rfind("Internal bug detected", 0)) { + if (error_msg.starts_with("Internal bug detected")) { // Only allow the intentional internal bug assert(error_msg.find("trigger_internal_bug") != std::string::npos); } |