mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-03 20:21:10 +00:00
rpc: Capture potentially large UniValue by ref for rpcdoccheck
Github-Pull: 25237 Rebased-From: 20ff4991e548630d7bb5e491fa4d69ec49369872
This commit is contained in:
parent
42af9596ce
commit
7fcac96597
@ -573,7 +573,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
|
||||
throw std::runtime_error(ToString());
|
||||
}
|
||||
const UniValue ret = m_fun(*this, request);
|
||||
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…
x
Reference in New Issue
Block a user