common: move pcp.cpp and netif.cpp files from util to common library since they depend on netaddress.cpp
Prevents check-deps.sh errors reported by fanquake https://github.com/bitcoin/bitcoin/pull/30415#issuecomment-2385475097
This commit is contained in:
1 parent
fc642c33ef
commit
d51edecddc
8 files changed
+14
-14
No files matched your search
@@ -114,6 +114,8 @@ add_library(bitcoin_common STATIC EXCLUDE_FROM_ALL
|
|||||||
common/init.cpp
|
common/init.cpp
|
||||||
common/interfaces.cpp
|
common/interfaces.cpp
|
||||||
common/messages.cpp
|
common/messages.cpp
|
||||||
|
common/netif.cpp
|
||||||
|
common/pcp.cpp
|
||||||
common/run_command.cpp
|
common/run_command.cpp
|
||||||
common/settings.cpp
|
common/settings.cpp
|
||||||
common/signmessage.cpp
|
common/signmessage.cpp
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
#include <config/bitcoin-config.h> // IWYU pragma: keep
|
||||||
|
|
||||||
#include <util/netif.h>
|
#include <common/netif.h>
|
||||||
|
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_UTIL_NETIF_H
|
#ifndef BITCOIN_COMMON_NETIF_H
|
||||||
#define BITCOIN_UTIL_NETIF_H
|
#define BITCOIN_COMMON_NETIF_H
|
||||||
|
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
|
||||||
@@ -16,4 +16,4 @@ std::optional<CNetAddr> QueryDefaultGateway(Network network);
|
|||||||
//! Return all local non-loopback IPv4 and IPv6 network addresses.
|
//! Return all local non-loopback IPv4 and IPv6 network addresses.
|
||||||
std::vector<CNetAddr> GetLocalAddresses();
|
std::vector<CNetAddr> GetLocalAddresses();
|
||||||
|
|
||||||
#endif // BITCOIN_UTIL_NETIF_H
|
#endif // BITCOIN_COMMON_NETIF_H
|
||||||
@@ -2,8 +2,9 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <util/pcp.h>
|
#include <common/pcp.h>
|
||||||
|
|
||||||
|
#include <common/netif.h>
|
||||||
#include <crypto/common.h>
|
#include <crypto/common.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
@@ -11,7 +12,6 @@
|
|||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <span.h>
|
#include <span.h>
|
||||||
#include <util/check.h>
|
#include <util/check.h>
|
||||||
#include <util/netif.h>
|
|
||||||
#include <util/readwritefile.h>
|
#include <util/readwritefile.h>
|
||||||
#include <util/sock.h>
|
#include <util/sock.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_UTIL_PCP_H
|
#ifndef BITCOIN_COMMON_PCP_H
|
||||||
#define BITCOIN_UTIL_PCP_H
|
#define BITCOIN_COMMON_PCP_H
|
||||||
|
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
|
||||||
@@ -65,4 +65,4 @@ std::variant<MappingResult, MappingError> NATPMPRequestPortMap(const CNetAddr &g
|
|||||||
//! Returns the external_ip:external_port of the mapping if successful, otherwise a MappingError.
|
//! Returns the external_ip:external_port of the mapping if successful, otherwise a MappingError.
|
||||||
std::variant<MappingResult, MappingError> PCPRequestPortMap(const PCPMappingNonce &nonce, const CNetAddr &gateway, const CNetAddr &bind, uint16_t port, uint32_t lifetime, int num_tries = 3, std::chrono::milliseconds timeout_per_try = std::chrono::milliseconds(1000));
|
std::variant<MappingResult, MappingError> PCPRequestPortMap(const PCPMappingNonce &nonce, const CNetAddr &gateway, const CNetAddr &bind, uint16_t port, uint32_t lifetime, int num_tries = 3, std::chrono::milliseconds timeout_per_try = std::chrono::milliseconds(1000));
|
||||||
|
|
||||||
#endif // BITCOIN_UTIL_PCP_H
|
#endif // BITCOIN_COMMON_PCP_H
|
||||||
+2
-2
@@ -7,14 +7,14 @@
|
|||||||
#include <mapport.h>
|
#include <mapport.h>
|
||||||
|
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
|
#include <common/netif.h>
|
||||||
|
#include <common/pcp.h>
|
||||||
#include <common/system.h>
|
#include <common/system.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <util/netif.h>
|
|
||||||
#include <util/pcp.h>
|
|
||||||
#include <util/thread.h>
|
#include <util/thread.h>
|
||||||
#include <util/threadinterrupt.h>
|
#include <util/threadinterrupt.h>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,6 +12,7 @@
|
|||||||
#include <banman.h>
|
#include <banman.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <common/args.h>
|
#include <common/args.h>
|
||||||
|
#include <common/netif.h>
|
||||||
#include <compat/compat.h>
|
#include <compat/compat.h>
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <scheduler.h>
|
#include <scheduler.h>
|
||||||
#include <util/fs.h>
|
#include <util/fs.h>
|
||||||
#include <util/netif.h>
|
|
||||||
#include <util/sock.h>
|
#include <util/sock.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
#include <util/thread.h>
|
#include <util/thread.h>
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ add_library(bitcoin_util STATIC EXCLUDE_FROM_ALL
|
|||||||
fs_helpers.cpp
|
fs_helpers.cpp
|
||||||
hasher.cpp
|
hasher.cpp
|
||||||
moneystr.cpp
|
moneystr.cpp
|
||||||
netif.cpp
|
|
||||||
pcp.cpp
|
|
||||||
rbf.cpp
|
rbf.cpp
|
||||||
readwritefile.cpp
|
readwritefile.cpp
|
||||||
serfloat.cpp
|
serfloat.cpp
|
||||||
|
|||||||
Reference in new issue
Block a user