From 40c2614ef43a59ec0c8dc4338bbe27862243f2bb Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Sat, 14 May 2011 16:20:30 -0500 Subject: [PATCH] Only include net.h when we have to --- src/db.cpp | 1 + src/headers.h | 1 - src/init.cpp | 1 + src/irc.cpp | 1 + src/main.cpp | 1 + src/main.h | 7 +++++++ src/net.cpp | 1 + src/rpc.cpp | 1 + 8 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/db.cpp b/src/db.cpp index 7152033c..b3ce00a0 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -4,6 +4,7 @@ #include "headers.h" #include "db.h" +#include "net.h" using namespace std; using namespace boost; diff --git a/src/headers.h b/src/headers.h index ee10c53e..67165c46 100644 --- a/src/headers.h +++ b/src/headers.h @@ -118,7 +118,6 @@ #include "bignum.h" #include "base58.h" #include "script.h" -#include "net.h" #include "main.h" #ifdef GUI #include "uibase.h" diff --git a/src/init.cpp b/src/init.cpp index b12c5eec..149110f4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -4,6 +4,7 @@ #include "headers.h" #include "db.h" #include "rpc.h" +#include "net.h" using namespace std; using namespace boost; diff --git a/src/irc.cpp b/src/irc.cpp index b2455463..5c9e0a96 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -4,6 +4,7 @@ #include "headers.h" #include "irc.h" +#include "net.h" using namespace std; using namespace boost; diff --git a/src/main.cpp b/src/main.cpp index dda366a1..5c6cb678 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" +#include "net.h" #include "cryptopp/sha.h" using namespace std; diff --git a/src/main.h b/src/main.h index 41177734..33c48927 100644 --- a/src/main.h +++ b/src/main.h @@ -24,6 +24,13 @@ class CBlockIndex; class CWalletTx; class CKeyItem; +class CMessageHeader; +class CAddress; +class CInv; +class CRequestTracker; +class CNode; +class CBlockIndex; + static const unsigned int MAX_BLOCK_SIZE = 1000000; static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2; static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; diff --git a/src/net.cpp b/src/net.cpp index 7a1c137c..60a91dff 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -5,6 +5,7 @@ #include "headers.h" #include "irc.h" #include "db.h" +#include "net.h" #ifdef USE_UPNP #include diff --git a/src/rpc.cpp b/src/rpc.cpp index e826d0b4..9ab7710a 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -5,6 +5,7 @@ #include "headers.h" #include "cryptopp/sha.h" #include "db.h" +#include "net.h" #undef printf #include #include