diff --git a/src/addrdb.h b/src/addrdb.h --- a/src/addrdb.h +++ b/src/addrdb.h @@ -7,6 +7,7 @@ #define BITCOIN_ADDRDB_H #include +#include // For banmap_t #include #include @@ -50,8 +51,6 @@ } }; -typedef std::map banmap_t; - /** Access to the (IP) address database (peers.dat) */ class CAddrDB { private: diff --git a/src/banman.h b/src/banman.h --- a/src/banman.h +++ b/src/banman.h @@ -8,6 +8,7 @@ #include #include #include +#include // For banmap_t #include #include diff --git a/src/interfaces/node.h b/src/interfaces/node.h --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -5,10 +5,11 @@ #ifndef BITCOIN_INTERFACES_NODE_H #define BITCOIN_INTERFACES_NODE_H -#include // For banmap_t -#include // For Amount -#include // For CConnman::NumConnections -#include // For Network +#include // For Amount +#include // For CConnman::NumConnections +#include // For banmap_t +#include // For Network + #include // For SecureString #include diff --git a/src/net_types.h b/src/net_types.h new file mode 100644 --- /dev/null +++ b/src/net_types.h @@ -0,0 +1,15 @@ +// Copyright (c) 2019 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_NET_TYPES_H +#define BITCOIN_NET_TYPES_H + +#include + +class CBanEntry; +class CSubNet; + +using banmap_t = std::map; + +#endif // BITCOIN_NET_TYPES_H diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -4,9 +4,9 @@ #include -#include - #include +#include // For banmap_t +#include #include diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -11,6 +11,7 @@ #include #include #include +#include // For banmap_t #include #include #include