Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ string CRPCTable::help(string strCommand) const
Value help(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"help [command]\n"
"List commands, or get help for a command.");
Expand All @@ -210,7 +210,7 @@ Value help(const Array& params, bool fHelp)
Value stop(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"stop <detach>\n"
"<detach> is true or false to detach the database or not for this stop only\n"
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static bool vfLimited[NET_MAX] = {};
static CNode* pnodeLocalHost = NULL;
CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
uint64 nLocalHostNonce = 0;
array<int, THREAD_MAX> vnThreadsRunning;
boost::array<int, THREAD_MAX> vnThreadsRunning;
static std::vector<SOCKET> vhListenSocket;
CAddrMan addrman;

Expand Down
2 changes: 2 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#include <QMainWindow>
#include <QSystemTrayIcon>

#ifndef Q_MOC_RUN
#include "util.h" // for uint64
//#include "banner.h"
#endif

class StyleSheetEditor;

Expand Down
2 changes: 2 additions & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#ifndef Q_MOC_RUN
#include "rpcconsole.h"
#include "ui_rpcconsole.h"

#include "clientmodel.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#endif

#include <QTime>
#include <QTimer>
Expand Down
20 changes: 10 additions & 10 deletions src/rpcblockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri
Value getblockcount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/* dvd throw runtime_error(
"getblockcount\n"
"Returns the number of blocks in the longest block chain.");
Expand All @@ -134,7 +134,7 @@ Value getblockcount(const Array& params, bool fHelp)
Value getdifficulty(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd
throw runtime_error(
"getdifficulty\n"
Expand All @@ -151,7 +151,7 @@ Value getdifficulty(const Array& params, bool fHelp)
Value settxfee(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1 || AmountFromZeroValue(params[0]) < MIN_TX_FEE)
return NULL;
return Value();
/*dvd throw runtime_error(
"settxfee <amount>\n"
"<amount> is a real and is rounded to the nearest 0.01");
Expand All @@ -165,7 +165,7 @@ Value settxfee(const Array& params, bool fHelp)
Value getrawmempool(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getrawmempool\n"
"Returns all transaction ids in memory pool.");
Expand All @@ -183,14 +183,14 @@ Value getrawmempool(const Array& params, bool fHelp)
Value getblockhash(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblockhash <index>\n"
"Returns hash of block in best-block-chain at <index>.");
*/
int nHeight = params[0].get_int();
if (nHeight < 0 || nHeight > nBestHeight)
return NULL;
return Value();
//dvd throw runtime_error("Block number out of range.");

CBlockIndex* pblockindex = FindBlockByHeight(nHeight);
Expand All @@ -200,7 +200,7 @@ Value getblockhash(const Array& params, bool fHelp)
Value getblock(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblock <hash> [txinfo]\n"
"txinfo optional to print more detailed tx info\n"
Expand All @@ -222,15 +222,15 @@ Value getblock(const Array& params, bool fHelp)
Value getblockbynumber(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblock <number> [txinfo]\n"
"txinfo optional to print more detailed tx info\n"
"Returns details of a block with given block-number.");
*/
int nHeight = params[0].get_int();
if (nHeight < 0 || nHeight > nBestHeight)
return NULL;
return Value();
//dvd throw runtime_error("Block number out of range.");

CBlock block;
Expand All @@ -250,7 +250,7 @@ Value getblockbynumber(const Array& params, bool fHelp)
Value getcheckpoint(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getcheckpoint\n"
"Show info of synchronized checkpoint.\n");
Expand Down
4 changes: 2 additions & 2 deletions src/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CTxDump
Value importprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"importprivkey <2GiveCoinprivkey> [label]\n"
"Adds a private key (as returned by dumpprivkey) to your wallet.");
Expand Down Expand Up @@ -77,7 +77,7 @@ Value importprivkey(const Array& params, bool fHelp)
Value dumpprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
return NULL;
return Value();
/* throw runtime_error(
"dumpprivkey <2GiveCoinaddress>\n"
"Reveals the private key corresponding to <2GiveCoinaddress>.");
Expand Down
22 changes: 11 additions & 11 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace std;
Value getgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw std::runtime_error(
"getgenerate\n"
"Returns true or false.");
Expand All @@ -29,7 +29,7 @@ Value getgenerate(const Array& params, bool fHelp)
Value setgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"setgenerate <generate> [genproclimit]\n"
"<generate> is true or false to turn generation on or off.\n"
Expand All @@ -56,7 +56,7 @@ Value setgenerate(const Array& params, bool fHelp)
Value getmint(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw std::runtime_error(
"getmint\n"
"Returns true or false.");
Expand All @@ -67,7 +67,7 @@ Value getmint(const Array& params, bool fHelp)
Value setmint(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"setmint <stake>\n"
"<stake> is true or false to turn proof of stake minting on or off."
Expand All @@ -88,7 +88,7 @@ Value setmint(const Array& params, bool fHelp)
Value gethashespersec(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"gethashespersec\n"
"Returns a recent hashes per second performance measurement while generating.");
Expand All @@ -102,7 +102,7 @@ Value gethashespersec(const Array& params, bool fHelp)
Value getmininginfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getmininginfo\n"
"Returns an object containing mining-related information.");
Expand Down Expand Up @@ -148,7 +148,7 @@ Value GetNetworkHashPS(int lookup) {
Value getnetworkhashps(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getnetworkhashps [blocks]\n"
"Returns the estimated network hashes per second based on the last 120 blocks.\n"
Expand All @@ -161,7 +161,7 @@ Value getnetworkhashps(const Array& params, bool fHelp)
Value getworkex(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
return NULL;
return Value();
/* throw runtime_error(
"getworkex [data, coinbase]\n"
"If [data, coinbase] is not specified, returns extended work data.\n"
Expand Down Expand Up @@ -292,7 +292,7 @@ Value getworkex(const Array& params, bool fHelp)
Value getwork(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getwork [data]\n"
"If [data] is not specified, returns formatted hash data to work on:\n"
Expand Down Expand Up @@ -410,7 +410,7 @@ Value getwork(const Array& params, bool fHelp)
Value getblocktemplate(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblocktemplate [params]\n"
"Returns data needed to construct a block to work on:\n"
Expand Down Expand Up @@ -568,7 +568,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
Value submitblock(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"submitblock <hex data> [optional-params-obj]\n"
"[optional-params-obj] parameter is currently ignored.\n"
Expand Down
10 changes: 5 additions & 5 deletions src/rpcnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace std;
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getconnectioncount\n"
"Returns the number of connections to other nodes.");
Expand All @@ -42,7 +42,7 @@ static void CopyNodeStats(std::vector<CNodeStats>& vstats)
Value getpeerinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getpeerinfo\n"
"Returns data about each connected network node.");
Expand Down Expand Up @@ -80,7 +80,7 @@ Value addnode(const Array& params, bool fHelp)
strCommand = params[1].get_str();
if (fHelp || params.size() != 2 ||
(strCommand != "onetry" && strCommand != "add" && strCommand != "remove"))
return NULL;
return Value();
/*dvd throw runtime_error(
"addnode <node> <add|remove|onetry>\n"
"Attempts add or remove <node> from the addnode list or try a connection to <node> once.");
Expand Down Expand Up @@ -119,7 +119,7 @@ Value addnode(const Array& params, bool fHelp)
Value getaddednodeinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getaddednodeinfo <dns> [node]\n"
"Returns information about the given added node, or all added nodes\n"
Expand Down Expand Up @@ -223,7 +223,7 @@ extern map<uint256, CAlert> mapAlerts;
Value sendalert(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 6)
return NULL;
return Value();
/*dvd throw runtime_error(
"sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]\n"
"<message> is the alert text message\n"
Expand Down
12 changes: 6 additions & 6 deletions src/rpcrawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
Value getrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/* throw runtime_error(
"getrawtransaction <txid> [verbose=0]\n"
"If verbose=0, returns a string that is\n"
Expand Down Expand Up @@ -141,7 +141,7 @@ Value getrawtransaction(const Array& params, bool fHelp)
Value listunspent(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 3)
return NULL;
return Value();
/*dvd throw runtime_error(
"listunspent [minconf=1] [maxconf=9999999] [\"address\",...]\n"
"Returns array of unspent transaction outputs\n"
Expand Down Expand Up @@ -210,7 +210,7 @@ Value listunspent(const Array& params, bool fHelp)
Value createrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 2)
return NULL;
return Value();
/* throw runtime_error(
"createrawtransaction [{\"txid\":txid,\"vout\":n},...] {address:amount,...}\n"
"Create a transaction spending given inputs\n"
Expand Down Expand Up @@ -276,7 +276,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
Value decoderawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"decoderawtransaction <hex string>\n"
"Return a JSON object representing the serialized, hex-encoded transaction.");
Expand All @@ -302,7 +302,7 @@ Value decoderawtransaction(const Array& params, bool fHelp)
Value signrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 4)
return NULL;
return Value();
/* throw runtime_error(
"signrawtransaction <hex string> [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [<privatekey1>,...] [sighashtype=\"ALL\"]\n"
"Sign inputs for raw transaction (serialized, hex-encoded).\n"
Expand Down Expand Up @@ -493,7 +493,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
Value sendrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1)
return NULL;
return Value();
/* throw runtime_error(
"sendrawtransaction <hex string>\n"
"Submits raw transaction (serialized, hex-encoded) to local node and network.");
Expand Down
Loading