rpc: extract wallet "warnings" fields to a util helper

This commit is contained in:
Jon Atack
2023-03-19 10:16:09 -07:00
parent f73782a903
commit 079d8cdda8
5 changed files with 18 additions and 4 deletions

View File

@@ -381,4 +381,12 @@ private:
const RPCExamples m_examples;
};
/**
* Push warning messages to an RPC "warnings" field as a JSON array of strings.
*
* @param[in] warnings Warning messages to push.
* @param[out] obj UniValue object to push the warnings array object to.
*/
void PushWarnings(const UniValue& warnings, UniValue& obj);
#endif // BITCOIN_RPC_UTIL_H