aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-19 15:10:04 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-25 10:31:35 +0200
commit84ce18ca9339901f65d77a5821eb65f771316558 (patch)
tree61012d3d9743d5ce8d0e9510c36f60856752c883 /src/util.cpp
parent14f888ca804386b111b07e8988753d67f507ba30 (diff)
Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp
index a19c015da6..7a0e2cc800 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5,7 +5,7 @@
#include "util.h"
-#include "chainparams.h"
+#include "chainparamsbase.h"
#include "sync.h"
#include "ui_interface.h"
#include "uint256.h"
@@ -918,7 +918,7 @@ boost::filesystem::path GetDefaultDataDir()
#endif
}
-static boost::filesystem::path pathCached[CChainParams::MAX_NETWORK_TYPES+1];
+static boost::filesystem::path pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1];
static CCriticalSection csPathCached;
const boost::filesystem::path &GetDataDir(bool fNetSpecific)
@@ -927,8 +927,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
LOCK(csPathCached);
- int nNet = CChainParams::MAX_NETWORK_TYPES;
- if (fNetSpecific) nNet = Params().NetworkID();
+ int nNet = CBaseChainParams::MAX_NETWORK_TYPES;
+ if (fNetSpecific) nNet = BaseParams().NetworkID();
fs::path &path = pathCached[nNet];
@@ -947,7 +947,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
path = GetDefaultDataDir();
}
if (fNetSpecific)
- path /= Params().DataDir();
+ path /= BaseParams().DataDir();
fs::create_directories(path);
@@ -956,7 +956,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
void ClearDatadirCache()
{
- std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
+ std::fill(&pathCached[0], &pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1],
boost::filesystem::path());
}