mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
rpc: Capture potentially large UniValue by ref for rpcdoccheck
This commit is contained in:
parent
ba48fcf4a4
commit
20ff4991e5
1 changed files with 1 additions and 1 deletions
|
@ -583,7 +583,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
|
|||
}
|
||||
const UniValue ret = m_fun(*this, request);
|
||||
if (gArgs.GetBoolArg("-rpcdoccheck", DEFAULT_RPC_DOC_CHECK)) {
|
||||
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); }));
|
||||
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); }));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue