mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
rpc: Capture potentially large UniValue by ref for rpcdoccheck
Github-Pull: 25237
Rebased-From: 20ff4991e5
This commit is contained in:
committed by
MacroFake
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user