move-only: move warnings from common to node

Since rpc/util.cpp is in common, also move GetNodeWarnings() to
node::GetWarningsForRPC()
This commit is contained in:
stickies-v
2024-04-18 14:05:12 +01:00
parent bed29c481a
commit 20e616f864
14 changed files with 50 additions and 39 deletions

View File

@@ -20,6 +20,7 @@
#include <net.h>
#include <node/context.h>
#include <node/miner.h>
#include <node/warnings.h>
#include <pow.h>
#include <rpc/blockchain.h>
#include <rpc/mining.h>
@@ -454,7 +455,7 @@ static RPCHelpMan getmininginfo()
obj.pushKV("networkhashps", getnetworkhashps().HandleRequest(request));
obj.pushKV("pooledtx", (uint64_t)mempool.size());
obj.pushKV("chain", chainman.GetParams().GetChainTypeString());
obj.pushKV("warnings", GetNodeWarnings(IsDeprecatedRPCEnabled("warnings")));
obj.pushKV("warnings", node::GetWarningsForRpc(IsDeprecatedRPCEnabled("warnings")));
return obj;
},
};