From 1512d5ce64b9a53260f5aa695bc79a0e48d6294f Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Sat, 14 May 2011 15:57:34 -0500 Subject: [PATCH] Only include db.h when we have to. --- src/db.cpp | 1 + src/headers.h | 1 - src/init.cpp | 1 + src/main.cpp | 1 + src/main.h | 3 +++ src/net.cpp | 1 + src/rpc.cpp | 1 + 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/db.cpp b/src/db.cpp index 52c0f5b4c..7152033c4 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3,6 +3,7 @@ // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" +#include "db.h" using namespace std; using namespace boost; diff --git a/src/headers.h b/src/headers.h index 7cc6d3b90..2d309f959 100644 --- a/src/headers.h +++ b/src/headers.h @@ -118,7 +118,6 @@ #include "bignum.h" #include "base58.h" #include "script.h" -#include "db.h" #include "net.h" #include "main.h" #include "rpc.h" diff --git a/src/init.cpp b/src/init.cpp index 431c533a8..14f4904f5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" +#include "db.h" using namespace std; using namespace boost; diff --git a/src/main.cpp b/src/main.cpp index 68b6b4ee1..dda366a1f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" +#include "db.h" #include "cryptopp/sha.h" using namespace std; diff --git a/src/main.h b/src/main.h index 92b73fe5a..411777349 100644 --- a/src/main.h +++ b/src/main.h @@ -77,6 +77,9 @@ extern int fUseUPnP; +class CReserveKey; +class CTxDB; +class CTxIndex; bool CheckDiskSpace(uint64 nAdditionalBytes=0); diff --git a/src/net.cpp b/src/net.cpp index 3339b7718..7a1c137c7 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -4,6 +4,7 @@ #include "headers.h" #include "irc.h" +#include "db.h" #ifdef USE_UPNP #include diff --git a/src/rpc.cpp b/src/rpc.cpp index 9efcbbb15..e826d0b44 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -4,6 +4,7 @@ #include "headers.h" #include "cryptopp/sha.h" +#include "db.h" #undef printf #include #include