diff options
author | Jon Atack <jon@atack.com> | 2023-07-23 20:45:10 -0600 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2023-09-19 15:54:17 -0600 |
commit | bbb68ffdbdafb6717dcadac074f6098750b8aa77 (patch) | |
tree | 702d08249de935e1036d2cb87af7754031e7de43 /src/rpc | |
parent | 1dd62c5295ca319c94f7233bcb2e11f9d37a33f1 (diff) |
refactor: drop protocol.h include header in rpc/util.h
as it was only needed for GetServicesNames(). This potentially avoids needlessly
compiling the 500 lines of protocol.h in the 35 files other than rpc/net.cpp
that include rpc/util.h.
Drop an unneeded CPubKey forward declaration. The other IWYU suggestions would
require more extensive changes in other files.
Add 3 already-missing include headers in other translation units that are needed
to compile without protocol.h in rpc/util.h, as it includes netaddress.h, which
in turn includes util/strencodings.h.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mempool.cpp | 1 | ||||
-rw-r--r-- | src/rpc/util.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index 377e9de0e8..bcc58fe1a6 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -21,6 +21,7 @@ #include <univalue.h> #include <util/fs.h> #include <util/moneystr.h> +#include <util/strencodings.h> #include <util/time.h> #include <utility> diff --git a/src/rpc/util.h b/src/rpc/util.h index 663ae34d8b..609ec32818 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -9,7 +9,6 @@ #include <consensus/amount.h> #include <node/transaction.h> #include <outputtype.h> -#include <protocol.h> #include <pubkey.h> #include <rpc/protocol.h> #include <rpc/request.h> @@ -59,7 +58,6 @@ extern const std::string UNIX_EPOCH_TIME; extern const std::string EXAMPLE_ADDRESS[2]; class FillableSigningProvider; -class CPubKey; class CScript; struct Sections; |