From 42fb5311b19582361409d65c6fddeadbee14bb97 Mon Sep 17 00:00:00 2001 From: stickies-v Date: Wed, 10 Apr 2024 12:16:21 +0200 Subject: 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. --- doc/release-notes-29845.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/release-notes-29845.md (limited to 'doc') diff --git a/doc/release-notes-29845.md b/doc/release-notes-29845.md new file mode 100644 index 0000000000..4994d0a34d --- /dev/null +++ b/doc/release-notes-29845.md @@ -0,0 +1,8 @@ +RPC +--- + +- the `warnings` field in `getblockchaininfo`, `getmininginfo` and + `getnetworkinfo` now returns all the active node warnings as an array + of strings, instead of just a single warning. The current behaviour + can temporarily be restored by running bitcoind with configuration + option `-deprecatedrpc=warnings`. \ No newline at end of file -- cgit v1.2.3