Skip to content

Commit

Permalink
added back "getnetworkhashps"
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumhocker committed Nov 23, 2015
1 parent afeb498 commit 59912dc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eMark-qt.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = eMark-qt
VERSION = 1.3.0
VERSION = 1.3.2
INCLUDEPATH += src src/json src/qt
QT += network
DEFINES += ENABLE_WALLET
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and eMark-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0

// Set to true for release, false for prerelease or test build
Expand Down
9 changes: 9 additions & 0 deletions src/rpcmining.cpp
Expand Up @@ -76,6 +76,15 @@ Value getstakesubsidy(const Array& params, bool fHelp)
return (uint64_t)GetProofOfStakeReward(nCoinAge, 0, nTime);
}

Value getnetworkhashps(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getnetworkhashps ( blocks height )\n"
"\nReturns the estimated network hashes per second based on the last n blocks.\n"
);
return GetPoWMHashPS();
}
Value getmininginfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
Expand Down
1 change: 1 addition & 0 deletions src/rpcserver.cpp
Expand Up @@ -229,6 +229,7 @@ static const CRPCCommand vRPCCommands[] =
{ "ping", &ping, true, false, false },
{ "getnettotals", &getnettotals, true, true, false },
{ "getdifficulty", &getdifficulty, true, false, false },
{ "getnetworkhashps", &getnetworkhashps, true, false, false },
{ "getinfo", &getinfo, true, false, false },
{ "getrawmempool", &getrawmempool, true, false, false },
{ "getblock", &getblock, false, false, false },
Expand Down
1 change: 1 addition & 0 deletions src/rpcserver.h
Expand Up @@ -169,6 +169,7 @@ extern json_spirit::Value sendrawtransaction(const json_spirit::Array& params, b
extern json_spirit::Value getbestblockhash(const json_spirit::Array& params, bool fHelp); // in rpcblockchain.cpp
extern json_spirit::Value getblockcount(const json_spirit::Array& params, bool fHelp); // in rpcblockchain.cpp
extern json_spirit::Value getdifficulty(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value settxfee(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getrawmempool(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getblockhash(const json_spirit::Array& params, bool fHelp);
Expand Down

0 comments on commit 59912dc

Please sign in to comment.