mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
rpc: return warnings as an array instead of just a single one
The RPC documentation for `getblockchaininfo`, `getmininginfo` and `getnetworkinfo` states that "warnings" returns "any network and blockchain warnings". In practice, only a single warning is returned. Fix that by returning all warnings as an array. As a side benefit, cleans up the GetWarnings() logic.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <util/check.h>
|
||||
#include <util/result.h>
|
||||
#include <util/signalinterrupt.h>
|
||||
#include <util/string.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
@@ -91,7 +92,7 @@ public:
|
||||
explicit NodeImpl(NodeContext& context) { setContext(&context); }
|
||||
void initLogging() override { InitLogging(args()); }
|
||||
void initParameterInteraction() override { InitParameterInteraction(args()); }
|
||||
bilingual_str getWarnings() override { return GetWarnings(true); }
|
||||
bilingual_str getWarnings() override { return Join(GetWarnings(), Untranslated("<hr />")); }
|
||||
int getExitStatus() override { return Assert(m_context)->exit_status.load(); }
|
||||
uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); }
|
||||
bool baseInitialize() override
|
||||
|
||||
Reference in New Issue
Block a user