From c68e56f61f572937db0dcc2543aa73deb79f3eb8 Mon Sep 17 00:00:00 2001 From: bitgdev Date: Tue, 14 Aug 2018 23:23:30 +0200 Subject: [PATCH] code cleanup --- src/coins.h | 10 +++++----- src/qt/blockexplorer.cpp | 2 -- src/qt/forms/coincontroldialog.ui | 2 +- src/qt/macnotificationhandler.mm | 2 +- src/rpcclient.cpp | 1 - src/rpcmisc.cpp | 6 +++--- src/rpcprotocol.cpp | 2 +- src/rpcserver.cpp | 1 + 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/coins.h b/src/coins.h index b7069bfb..3f9f469d 100755 --- a/src/coins.h +++ b/src/coins.h @@ -18,7 +18,7 @@ #include #include -/** +/** ****Note - for Bitcoin Green we added fCoinStake to the 2nd bit. Keep in mind when reading the following and adjust as needed. * Pruned version of CTransaction: only retains metadata and unspent transaction outputs @@ -388,10 +388,10 @@ enum { static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE | LOCKTIME_MEDIAN_TIME_PAST; -/** +/** * A reference to a mutable cache entry. Encapsulating it allows us to run * cleanup code after the modification is finished, and keeping track of - * concurrent modifications. + * concurrent modifications. */ class CCoinsModifier { @@ -416,7 +416,7 @@ class CCoinsViewCache : public CCoinsViewBacked /** * Make mutable so that we can "fill the cache" even from Get-methods - * declared as "const". + * declared as "const". */ mutable uint256 hashBlock; mutable CCoinsMap cacheCoins; @@ -456,7 +456,7 @@ class CCoinsViewCache : public CCoinsViewBacked //! Calculate the size of the cache (in number of transactions) unsigned int GetCacheSize() const; - /** + /** * Amount of bitcoin green coming in to a transaction * Note that lightweight clients may not know anything besides the hash of previous transactions, * so may not be able to calculate this. diff --git a/src/qt/blockexplorer.cpp b/src/qt/blockexplorer.cpp index 94dfe0b7..f92a1441 100755 --- a/src/qt/blockexplorer.cpp +++ b/src/qt/blockexplorer.cpp @@ -552,8 +552,6 @@ void BlockExplorer::setContent(const std::string& Content) { QString CSS = "body {font-size:12px; color:#333; bgcolor:#fafafa;}\n a, span { font-family: monospace; }\n span.addr {color:#333; font-weight: bold;}\n table tr td {padding: 3px; border: 1px solid black; background-color: #fafafa;}\n td.d0 {font-weight: bold; color:#333;}\n h2, h3 { white-space:nowrap; color:#333;}\n a { color:#337ab7; text-decoration:none; }\n a.nav {color:#337ab7;}\n"; QString FullContent = "" + "" + Content.c_str() + ""; - // printf(FullContent.toUtf8()); - ui->content->setText(FullContent); } diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui index a3f5dbeb..2f088c4d 100755 --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -481,7 +481,7 @@ - + Date diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm index 38ffbbb9..9ffcb738 100755 --- a/src/qt/macnotificationhandler.mm +++ b/src/qt/macnotificationhandler.mm @@ -79,7 +79,7 @@ - (NSString *)__bundleIdentifier static MacNotificationHandler *s_instance = NULL; if (!s_instance) { s_instance = new MacNotificationHandler(); - + Class aPossibleClass = objc_getClass("NSBundle"); if (aPossibleClass) { // change NSBundle -bundleIdentifier method to return a correct bundle identifier diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index e69f0367..d392743c 100755 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -122,7 +122,6 @@ static const CRPCConvertParam vRPCConvertParams[] = {"getfeeinfo", 0}, {"preparecommunityproposal", 2}, {"submitcommunityproposal", 2}, - }; class CRPCConvertTable diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index b1999ada..f12c7a48 100755 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -74,9 +74,6 @@ UniValue getinfo(const UniValue& params, bool fHelp) "\nExamples:\n" + HelpExampleCli("getinfo", "") + HelpExampleRpc("getinfo", "")); - proxyType proxy; - GetProxy(NET_IPV4, proxy); - UniValue obj(UniValue::VOBJ); // During inital block verification chainActive.Tip() might be not yet initialized @@ -85,6 +82,9 @@ UniValue getinfo(const UniValue& params, bool fHelp) return obj; } + proxyType proxy; + GetProxy(NET_IPV4, proxy); + obj.push_back(Pair("version", CLIENT_VERSION)); obj.push_back(Pair("protocolversion", PROTOCOL_VERSION)); #ifdef ENABLE_WALLET diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp index df220e00..8caa6cfd 100755 --- a/src/rpcprotocol.cpp +++ b/src/rpcprotocol.cpp @@ -253,7 +253,7 @@ int ReadHTTPMessage(std::basic_istream& stream, map& mapHe * JSON-RPC protocol. Bitcoin Green speaks version 1.0 for maximum compatibility, * but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were * unspecified (HTTP errors and contents of 'error'). - * + * * 1.0 spec: http://json-rpc.org/wiki/specification * 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html * http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 06be3b59..f63d5753 100755 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -360,6 +360,7 @@ static const CRPCCommand vRPCCommands[] = {"bitcoingreen", "checkcommunityproposals", &checkcommunityproposals, true, true, false}, {"bitcoingreen", "getcommunityproposalvotes", &getcommunityproposalvotes, true, true, false}, {"bitcoingreen", "mncommunityvote", &mncommunityvote, true, true, false}, + #ifdef ENABLE_WALLET /* Wallet */