diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | src/bitcoinrpc.h | 2 | ||||
| -rw-r--r-- | src/main.cpp | 8 | ||||
| -rw-r--r-- | src/net.cpp | 2 | ||||
| -rw-r--r-- | src/rpcdump.cpp | 6 | ||||
| -rw-r--r-- | src/util.cpp | 8 | ||||
| -rw-r--r-- | src/util.h | 1 |
7 files changed, 13 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore index fe93caafb..2b70e2cca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ src/*.exe src/bitcoin src/bitcoind +src/test_bitcoin src/build.h .*.swp *.*~* diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index 8b2d90517..7a8273756 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -13,6 +13,8 @@ #include "json/json_spirit_writer_template.h" #include "json/json_spirit_utils.h" +json_spirit::Object JSONRPCError(int code, const std::string& message); + void ThreadRPCServer(void* parg); int CommandLineRPC(int argc, char *argv[]); diff --git a/src/main.cpp b/src/main.cpp index 9a4d7abc8..9e20ca626 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1501,14 +1501,6 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) } -static void -runCommand(std::string strCommand) -{ - int nErr = ::system(strCommand.c_str()); - if (nErr) - printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); -} - // Called from inside SetBestChain: attaches a block to the new best chain being built bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew) { diff --git a/src/net.cpp b/src/net.cpp index 4c795554a..9193e873e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -479,7 +479,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) /// debug print printf("trying connection %s lastseen=%.1fhrs\n", pszDest ? pszDest : addrConnect.ToString().c_str(), - pszDest ? 0 : (double)(addrConnect.nTime - GetAdjustedTime())/3600.0); + pszDest ? 0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0); // Connect SOCKET hSocket; diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index 5fa24f638..6fb0e3556 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -8,18 +8,12 @@ #include <boost/lexical_cast.hpp> -#include "json/json_spirit_reader_template.h" -#include "json/json_spirit_writer_template.h" -#include "json/json_spirit_utils.h" - #define printf OutputDebugStringF // using namespace boost::asio; using namespace json_spirit; using namespace std; -extern Object JSONRPCError(int code, const string& message); - class CTxDump { public: diff --git a/src/util.cpp b/src/util.cpp index 08e3625b3..3ab30baff 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1079,3 +1079,11 @@ boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) return fs::path(""); } #endif + +void runCommand(std::string strCommand) +{ + int nErr = ::system(strCommand.c_str()); + if (nErr) + printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); +} + diff --git a/src/util.h b/src/util.h index 5b58147ce..c1c91bdbc 100644 --- a/src/util.h +++ b/src/util.h @@ -171,6 +171,7 @@ int64 GetAdjustedTime(); std::string FormatFullVersion(); std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); void AddTimeData(const CNetAddr& ip, int64 nTime); +void runCommand(std::string strCommand); |