Merge #7348: MOVE ONLY: move rpc* to rpc/
d13f65erpc: update inline comments to refer to new file paths (Daniel Cousens)a0eaff8move rpc* to rpc/ (Daniel Cousens)
This commit is contained in:
commit
62f2d769e4
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Test RPC calls related to blockchain state. Tests correspond to code in
|
# Test RPC calls related to blockchain state. Tests correspond to code in
|
||||||
# rpcblockchain.cpp.
|
# rpc/blockchain.cpp.
|
||||||
#
|
#
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|||||||
@ -131,9 +131,9 @@ BITCOIN_CORE_H = \
|
|||||||
pubkey.h \
|
pubkey.h \
|
||||||
random.h \
|
random.h \
|
||||||
reverselock.h \
|
reverselock.h \
|
||||||
rpcclient.h \
|
rpc/client.h \
|
||||||
rpcprotocol.h \
|
rpc/protocol.h \
|
||||||
rpcserver.h \
|
rpc/server.h \
|
||||||
scheduler.h \
|
scheduler.h \
|
||||||
script/interpreter.h \
|
script/interpreter.h \
|
||||||
script/script.h \
|
script/script.h \
|
||||||
@ -203,12 +203,12 @@ libbitcoin_server_a_SOURCES = \
|
|||||||
policy/policy.cpp \
|
policy/policy.cpp \
|
||||||
pow.cpp \
|
pow.cpp \
|
||||||
rest.cpp \
|
rest.cpp \
|
||||||
rpcblockchain.cpp \
|
rpc/blockchain.cpp \
|
||||||
rpcmining.cpp \
|
rpc/mining.cpp \
|
||||||
rpcmisc.cpp \
|
rpc/misc.cpp \
|
||||||
rpcnet.cpp \
|
rpc/net.cpp \
|
||||||
rpcrawtransaction.cpp \
|
rpc/rawtransaction.cpp \
|
||||||
rpcserver.cpp \
|
rpc/server.cpp \
|
||||||
script/sigcache.cpp \
|
script/sigcache.cpp \
|
||||||
timedata.cpp \
|
timedata.cpp \
|
||||||
torcontrol.cpp \
|
torcontrol.cpp \
|
||||||
@ -304,7 +304,7 @@ libbitcoin_util_a_SOURCES = \
|
|||||||
compat/glibcxx_sanity.cpp \
|
compat/glibcxx_sanity.cpp \
|
||||||
compat/strnlen.cpp \
|
compat/strnlen.cpp \
|
||||||
random.cpp \
|
random.cpp \
|
||||||
rpcprotocol.cpp \
|
rpc/protocol.cpp \
|
||||||
support/cleanse.cpp \
|
support/cleanse.cpp \
|
||||||
sync.cpp \
|
sync.cpp \
|
||||||
uint256.cpp \
|
uint256.cpp \
|
||||||
@ -322,7 +322,7 @@ endif
|
|||||||
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
||||||
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
libbitcoin_cli_a_SOURCES = \
|
libbitcoin_cli_a_SOURCES = \
|
||||||
rpcclient.cpp \
|
rpc/client.cpp \
|
||||||
$(BITCOIN_CORE_H)
|
$(BITCOIN_CORE_H)
|
||||||
|
|
||||||
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#include "chainparamsbase.h"
|
#include "chainparamsbase.h"
|
||||||
#include "clientversion.h"
|
#include "clientversion.h"
|
||||||
#include "rpcclient.h"
|
#include "rpc/client.h"
|
||||||
#include "rpcprotocol.h"
|
#include "rpc/protocol.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilstrencodings.h"
|
#include "utilstrencodings.h"
|
||||||
|
|
||||||
|
|||||||
@ -5,14 +5,13 @@
|
|||||||
|
|
||||||
#include "chainparams.h"
|
#include "chainparams.h"
|
||||||
#include "clientversion.h"
|
#include "clientversion.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "noui.h"
|
#include "noui.h"
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "httpserver.h"
|
#include "httpserver.h"
|
||||||
#include "httprpc.h"
|
#include "httprpc.h"
|
||||||
#include "rpcserver.h"
|
|
||||||
|
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "chainparams.h"
|
#include "chainparams.h"
|
||||||
#include "httpserver.h"
|
#include "httpserver.h"
|
||||||
#include "rpcprotocol.h"
|
#include "rpc/protocol.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "netbase.h"
|
#include "netbase.h"
|
||||||
#include "rpcprotocol.h" // For HTTP status codes
|
#include "rpc/protocol.h" // For HTTP status codes
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "ui_interface.h"
|
#include "ui_interface.h"
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
#include "miner.h"
|
#include "miner.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "policy/policy.h"
|
#include "policy/policy.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "script/standard.h"
|
#include "script/standard.h"
|
||||||
#include "script/sigcache.h"
|
#include "script/sigcache.h"
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#include "ui_interface.h"
|
#include "ui_interface.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
#include "bantablemodel.h"
|
#include "bantablemodel.h"
|
||||||
|
|
||||||
#include "chainparams.h"
|
#include "chainparams.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "rpcclient.h"
|
#include "rpc/client.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include "primitives/transaction.h"
|
#include "primitives/transaction.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "httpserver.h"
|
#include "httpserver.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "streams.h"
|
#include "streams.h"
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "txmempool.h"
|
#include "txmempool.h"
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "policy/policy.h"
|
#include "policy/policy.h"
|
||||||
#include "primitives/transaction.h"
|
#include "primitives/transaction.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "streams.h"
|
#include "streams.h"
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "txmempool.h"
|
#include "txmempool.h"
|
||||||
@ -3,9 +3,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcclient.h"
|
#include "rpc/client.h"
|
||||||
|
#include "rpc/protocol.h"
|
||||||
#include "rpcprotocol.h"
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
#include "miner.h"
|
#include "miner.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "pow.h"
|
#include "pow.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "txmempool.h"
|
#include "txmempool.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilstrencodings.h"
|
#include "utilstrencodings.h"
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "netbase.h"
|
#include "netbase.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "timedata.h"
|
#include "timedata.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilstrencodings.h"
|
#include "utilstrencodings.h"
|
||||||
@ -2,7 +2,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
|
|
||||||
#include "chainparams.h"
|
#include "chainparams.h"
|
||||||
#include "clientversion.h"
|
#include "clientversion.h"
|
||||||
@ -3,7 +3,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcprotocol.h"
|
#include "rpc/protocol.h"
|
||||||
|
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "tinyformat.h"
|
#include "tinyformat.h"
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "policy/policy.h"
|
#include "policy/policy.h"
|
||||||
#include "primitives/transaction.h"
|
#include "primitives/transaction.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "script/script.h"
|
#include "script/script.h"
|
||||||
#include "script/script_error.h"
|
#include "script/script_error.h"
|
||||||
#include "script/sign.h"
|
#include "script/sign.h"
|
||||||
@ -3,7 +3,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
|
|
||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
@ -7,7 +7,7 @@
|
|||||||
#define BITCOIN_RPCSERVER_H
|
#define BITCOIN_RPCSERVER_H
|
||||||
|
|
||||||
#include "amount.h"
|
#include "amount.h"
|
||||||
#include "rpcprotocol.h"
|
#include "rpc/protocol.h"
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -175,7 +175,7 @@ extern std::string HelpExampleRpc(const std::string& methodname, const std::stri
|
|||||||
|
|
||||||
extern void EnsureWalletIsUnlocked();
|
extern void EnsureWalletIsUnlocked();
|
||||||
|
|
||||||
extern UniValue getconnectioncount(const UniValue& params, bool fHelp); // in rpcnet.cpp
|
extern UniValue getconnectioncount(const UniValue& params, bool fHelp); // in rpc/net.cpp
|
||||||
extern UniValue getpeerinfo(const UniValue& params, bool fHelp);
|
extern UniValue getpeerinfo(const UniValue& params, bool fHelp);
|
||||||
extern UniValue ping(const UniValue& params, bool fHelp);
|
extern UniValue ping(const UniValue& params, bool fHelp);
|
||||||
extern UniValue addnode(const UniValue& params, bool fHelp);
|
extern UniValue addnode(const UniValue& params, bool fHelp);
|
||||||
@ -186,7 +186,7 @@ extern UniValue setban(const UniValue& params, bool fHelp);
|
|||||||
extern UniValue listbanned(const UniValue& params, bool fHelp);
|
extern UniValue listbanned(const UniValue& params, bool fHelp);
|
||||||
extern UniValue clearbanned(const UniValue& params, bool fHelp);
|
extern UniValue clearbanned(const UniValue& params, bool fHelp);
|
||||||
|
|
||||||
extern UniValue getgenerate(const UniValue& params, bool fHelp); // in rpcmining.cpp
|
extern UniValue getgenerate(const UniValue& params, bool fHelp); // in rpc/mining.cpp
|
||||||
extern UniValue setgenerate(const UniValue& params, bool fHelp);
|
extern UniValue setgenerate(const UniValue& params, bool fHelp);
|
||||||
extern UniValue generate(const UniValue& params, bool fHelp);
|
extern UniValue generate(const UniValue& params, bool fHelp);
|
||||||
extern UniValue getnetworkhashps(const UniValue& params, bool fHelp);
|
extern UniValue getnetworkhashps(const UniValue& params, bool fHelp);
|
||||||
@ -207,7 +207,7 @@ extern UniValue getblockchaininfo(const UniValue& params, bool fHelp);
|
|||||||
extern UniValue getnetworkinfo(const UniValue& params, bool fHelp);
|
extern UniValue getnetworkinfo(const UniValue& params, bool fHelp);
|
||||||
extern UniValue setmocktime(const UniValue& params, bool fHelp);
|
extern UniValue setmocktime(const UniValue& params, bool fHelp);
|
||||||
|
|
||||||
extern UniValue getrawtransaction(const UniValue& params, bool fHelp); // in rcprawtransaction.cpp
|
extern UniValue getrawtransaction(const UniValue& params, bool fHelp); // in rpc/rawtransaction.cpp
|
||||||
extern UniValue listunspent(const UniValue& params, bool fHelp);
|
extern UniValue listunspent(const UniValue& params, bool fHelp);
|
||||||
extern UniValue lockunspent(const UniValue& params, bool fHelp);
|
extern UniValue lockunspent(const UniValue& params, bool fHelp);
|
||||||
extern UniValue listlockunspent(const UniValue& params, bool fHelp);
|
extern UniValue listlockunspent(const UniValue& params, bool fHelp);
|
||||||
@ -219,7 +219,7 @@ extern UniValue sendrawtransaction(const UniValue& params, bool fHelp);
|
|||||||
extern UniValue gettxoutproof(const UniValue& params, bool fHelp);
|
extern UniValue gettxoutproof(const UniValue& params, bool fHelp);
|
||||||
extern UniValue verifytxoutproof(const UniValue& params, bool fHelp);
|
extern UniValue verifytxoutproof(const UniValue& params, bool fHelp);
|
||||||
|
|
||||||
extern UniValue getblockcount(const UniValue& params, bool fHelp); // in rpcblockchain.cpp
|
extern UniValue getblockcount(const UniValue& params, bool fHelp); // in rpc/blockchain.cpp
|
||||||
extern UniValue getbestblockhash(const UniValue& params, bool fHelp);
|
extern UniValue getbestblockhash(const UniValue& params, bool fHelp);
|
||||||
extern UniValue getdifficulty(const UniValue& params, bool fHelp);
|
extern UniValue getdifficulty(const UniValue& params, bool fHelp);
|
||||||
extern UniValue settxfee(const UniValue& params, bool fHelp);
|
extern UniValue settxfee(const UniValue& params, bool fHelp);
|
||||||
@ -2,8 +2,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "rpcclient.h"
|
#include "rpc/client.h"
|
||||||
|
|
||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "netbase.h"
|
#include "netbase.h"
|
||||||
@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
|
|||||||
adr = find_value(o1, "address");
|
adr = find_value(o1, "address");
|
||||||
banned_until = find_value(o1, "banned_until");
|
banned_until = find_value(o1, "banned_until");
|
||||||
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
|
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
|
||||||
int64_t now = GetTime();
|
int64_t now = GetTime();
|
||||||
BOOST_CHECK(banned_until.get_int64() > now);
|
BOOST_CHECK(banned_until.get_int64() > now);
|
||||||
BOOST_CHECK(banned_until.get_int64()-now <= 200);
|
BOOST_CHECK(banned_until.get_int64()-now <= 200);
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "rpcclient.h"
|
#include "rpc/client.h"
|
||||||
|
|
||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "base58.h"
|
#include "base58.h"
|
||||||
#include "chain.h"
|
#include "chain.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "script/script.h"
|
#include "script/script.h"
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "netbase.h"
|
#include "netbase.h"
|
||||||
#include "policy/rbf.h"
|
#include "policy/rbf.h"
|
||||||
#include "rpcserver.h"
|
#include "rpc/server.h"
|
||||||
#include "timedata.h"
|
#include "timedata.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilmoneystr.h"
|
#include "utilmoneystr.h"
|
||||||
@ -110,7 +110,7 @@ UniValue getnewaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 1)
|
if (fHelp || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getnewaddress ( \"account\" )\n"
|
"getnewaddress ( \"account\" )\n"
|
||||||
@ -188,7 +188,7 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getaccountaddress \"account\"\n"
|
"getaccountaddress \"account\"\n"
|
||||||
@ -220,7 +220,7 @@ UniValue getrawchangeaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 1)
|
if (fHelp || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getrawchangeaddress\n"
|
"getrawchangeaddress\n"
|
||||||
@ -255,7 +255,7 @@ UniValue setaccount(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"setaccount \"bitcoinaddress\" \"account\"\n"
|
"setaccount \"bitcoinaddress\" \"account\"\n"
|
||||||
@ -301,7 +301,7 @@ UniValue getaccount(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getaccount \"bitcoinaddress\"\n"
|
"getaccount \"bitcoinaddress\"\n"
|
||||||
@ -333,7 +333,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getaddressesbyaccount \"account\"\n"
|
"getaddressesbyaccount \"account\"\n"
|
||||||
@ -401,7 +401,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 2 || params.size() > 5)
|
if (fHelp || params.size() < 2 || params.size() > 5)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
"sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
||||||
@ -459,7 +459,7 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp)
|
if (fHelp)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listaddressgroupings\n"
|
"listaddressgroupings\n"
|
||||||
@ -510,7 +510,7 @@ UniValue signmessage(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 2)
|
if (fHelp || params.size() != 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"signmessage \"bitcoinaddress\" \"message\"\n"
|
"signmessage \"bitcoinaddress\" \"message\"\n"
|
||||||
@ -566,7 +566,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n"
|
"getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n"
|
||||||
@ -624,7 +624,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getreceivedbyaccount \"account\" ( minconf )\n"
|
"getreceivedbyaccount \"account\" ( minconf )\n"
|
||||||
@ -713,7 +713,7 @@ UniValue getbalance(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 3)
|
if (fHelp || params.size() > 3)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getbalance ( \"account\" minconf includeWatchonly )\n"
|
"getbalance ( \"account\" minconf includeWatchonly )\n"
|
||||||
@ -788,7 +788,7 @@ UniValue getunconfirmedbalance(const UniValue ¶ms, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 0)
|
if (fHelp || params.size() > 0)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getunconfirmedbalance\n"
|
"getunconfirmedbalance\n"
|
||||||
@ -804,7 +804,7 @@ UniValue movecmd(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 3 || params.size() > 5)
|
if (fHelp || params.size() < 3 || params.size() > 5)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"move \"fromaccount\" \"toaccount\" amount ( minconf \"comment\" )\n"
|
"move \"fromaccount\" \"toaccount\" amount ( minconf \"comment\" )\n"
|
||||||
@ -877,7 +877,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 3 || params.size() > 6)
|
if (fHelp || params.size() < 3 || params.size() > 6)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
"sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
||||||
@ -941,7 +941,7 @@ UniValue sendmany(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 2 || params.size() > 5)
|
if (fHelp || params.size() < 2 || params.size() > 5)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"sendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" [\"address\",...] )\n"
|
"sendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" [\"address\",...] )\n"
|
||||||
@ -1048,14 +1048,14 @@ UniValue sendmany(const UniValue& params, bool fHelp)
|
|||||||
return wtx.GetHash().GetHex();
|
return wtx.GetHash().GetHex();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defined in rpcmisc.cpp
|
// Defined in rpc/misc.cpp
|
||||||
extern CScript _createmultisig_redeemScript(const UniValue& params);
|
extern CScript _createmultisig_redeemScript(const UniValue& params);
|
||||||
|
|
||||||
UniValue addmultisigaddress(const UniValue& params, bool fHelp)
|
UniValue addmultisigaddress(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 2 || params.size() > 3)
|
if (fHelp || params.size() < 2 || params.size() > 3)
|
||||||
{
|
{
|
||||||
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
||||||
@ -1238,7 +1238,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 3)
|
if (fHelp || params.size() > 3)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listreceivedbyaddress ( minconf includeempty includeWatchonly)\n"
|
"listreceivedbyaddress ( minconf includeempty includeWatchonly)\n"
|
||||||
@ -1276,7 +1276,7 @@ UniValue listreceivedbyaccount(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 3)
|
if (fHelp || params.size() > 3)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listreceivedbyaccount ( minconf includeempty includeWatchonly)\n"
|
"listreceivedbyaccount ( minconf includeempty includeWatchonly)\n"
|
||||||
@ -1411,7 +1411,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 4)
|
if (fHelp || params.size() > 4)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listtransactions ( \"account\" count from includeWatchonly)\n"
|
"listtransactions ( \"account\" count from includeWatchonly)\n"
|
||||||
@ -1537,7 +1537,7 @@ UniValue listaccounts(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 2)
|
if (fHelp || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listaccounts ( minconf includeWatchonly)\n"
|
"listaccounts ( minconf includeWatchonly)\n"
|
||||||
@ -1616,7 +1616,7 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp)
|
if (fHelp)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listsinceblock ( \"blockhash\" target-confirmations includeWatchonly)\n"
|
"listsinceblock ( \"blockhash\" target-confirmations includeWatchonly)\n"
|
||||||
@ -1708,7 +1708,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"gettransaction \"txid\" ( includeWatchonly )\n"
|
"gettransaction \"txid\" ( includeWatchonly )\n"
|
||||||
@ -1823,7 +1823,7 @@ UniValue backupwallet(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 1)
|
if (fHelp || params.size() != 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"backupwallet \"destination\"\n"
|
"backupwallet \"destination\"\n"
|
||||||
@ -1849,7 +1849,7 @@ UniValue keypoolrefill(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 1)
|
if (fHelp || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"keypoolrefill ( newsize )\n"
|
"keypoolrefill ( newsize )\n"
|
||||||
@ -1893,7 +1893,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2))
|
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2))
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"walletpassphrase \"passphrase\" timeout\n"
|
"walletpassphrase \"passphrase\" timeout\n"
|
||||||
@ -1953,7 +1953,7 @@ UniValue walletpassphrasechange(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2))
|
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2))
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n"
|
"walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n"
|
||||||
@ -1999,7 +1999,7 @@ UniValue walletlock(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 0))
|
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 0))
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"walletlock\n"
|
"walletlock\n"
|
||||||
@ -2038,7 +2038,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (!pwalletMain->IsCrypted() && (fHelp || params.size() != 1))
|
if (!pwalletMain->IsCrypted() && (fHelp || params.size() != 1))
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"encryptwallet \"passphrase\"\n"
|
"encryptwallet \"passphrase\"\n"
|
||||||
@ -2095,7 +2095,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
||||||
@ -2179,7 +2179,7 @@ UniValue listlockunspent(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 0)
|
if (fHelp || params.size() > 0)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listlockunspent\n"
|
"listlockunspent\n"
|
||||||
@ -2228,7 +2228,7 @@ UniValue settxfee(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() < 1 || params.size() > 1)
|
if (fHelp || params.size() < 1 || params.size() > 1)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"settxfee amount\n"
|
"settxfee amount\n"
|
||||||
@ -2255,7 +2255,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 0)
|
if (fHelp || params.size() != 0)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"getwalletinfo\n"
|
"getwalletinfo\n"
|
||||||
@ -2297,7 +2297,7 @@ UniValue resendwallettransactions(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() != 0)
|
if (fHelp || params.size() != 0)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"resendwallettransactions\n"
|
"resendwallettransactions\n"
|
||||||
@ -2322,7 +2322,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
if (!EnsureWalletIsAvailable(fHelp))
|
if (!EnsureWalletIsAvailable(fHelp))
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
||||||
if (fHelp || params.size() > 3)
|
if (fHelp || params.size() > 3)
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"listunspent ( minconf maxconf [\"address\",...] )\n"
|
"listunspent ( minconf maxconf [\"address\",...] )\n"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user