RPC helper function that wraps warnings.GetMessages().
Declared in <node/warnings.h>
UniValue
GetWarningsForRpc(
Warnings const& warnings,
bool use_deprecated);
Returns a UniValue::VSTR with the latest warning if use_deprecated is set to true, or a UniValue::VARR with all warnings otherwise.
A UniValue string or array holding the active warnings.
| Name | Description |
|---|---|
| warnings | The warnings manager to read messages from. |
| use_deprecated | If true, return only the latest warning as a string; otherwise return all warnings as an array. |