From b884ababc29ce963826d8a4327ed6a5e629ff175 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 21 Apr 2021 16:39:40 +0200 Subject: rpc: move Ensure* helpers to server_util.h --- src/rpc/net.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/rpc/net.cpp') diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index e33f1ce4a3..6765735780 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include // For banmap_t @@ -17,12 +16,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -41,22 +40,6 @@ const std::vector CONNECTION_TYPE_DOC{ "feeler (short-lived automatic connection for testing addresses)" }; -CConnman& EnsureConnman(const NodeContext& node) -{ - if (!node.connman) { - throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); - } - return *node.connman; -} - -PeerManager& EnsurePeerman(const NodeContext& node) -{ - if (!node.peerman) { - throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); - } - return *node.peerman; -} - static RPCHelpMan getconnectioncount() { return RPCHelpMan{"getconnectioncount", -- cgit v1.2.3