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

@@ -16,6 +16,7 @@
#include <netbase.h>
#include <node/context.h>
#include <node/protocol_version.h>
#include <node/warnings.h>
#include <policy/settings.h>
#include <protocol.h>
#include <rpc/blockchain.h>
@@ -715,7 +716,7 @@ static RPCHelpMan getnetworkinfo()
}
}
obj.pushKV("localaddresses", std::move(localAddresses));
obj.pushKV("warnings", GetNodeWarnings(IsDeprecatedRPCEnabled("warnings")));
obj.pushKV("warnings", node::GetWarningsForRpc(IsDeprecatedRPCEnabled("warnings")));
return obj;
},
};