![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "rpc/server.h"#include "fs.h"#include "key_io.h"#include "random.h"#include "shutdown.h"#include "sync.h"#include "guiinterface.h"#include "util/system.h"#include "utilstrencodings.h"#include <boost/signals2/signal.hpp>#include <boost/thread.hpp>#include <boost/algorithm/string/classification.hpp>#include <boost/algorithm/string/split.hpp>#include <memory>#include <unordered_map>Go to the source code of this file.
Classes | |
| struct | CRPCSignals |
Functions | |
| void | RPCTypeCheck (const UniValue ¶ms, const std::list< UniValue::VType > &typesExpected, bool fAllowNull) |
| Type-check arguments; throws JSONRPCError if wrong type given. More... | |
| void | RPCTypeCheckArgument (const UniValue &value, const UniValueType &typeExpected) |
| Type-check one argument; throws JSONRPCError if wrong type given. More... | |
| void | RPCTypeCheckObj (const UniValue &o, const std::map< std::string, UniValueType > &typesExpected, bool fAllowNull, bool fStrict) |
| Check for expected keys/value types in an Object. More... | |
| CAmount | AmountFromValue (const UniValue &value) |
| UniValue | ValueFromAmount (const CAmount &amount) |
| uint256 | ParseHashV (const UniValue &v, std::string strName) |
| Utilities: convert hex-encoded Values (throws error if not hex). More... | |
| uint256 | ParseHashO (const UniValue &o, std::string strKey) |
| std::vector< unsigned char > | ParseHexV (const UniValue &v, std::string strName) |
| std::vector< unsigned char > | ParseHexO (const UniValue &o, std::string strKey) |
| int | ParseInt (const UniValue &o, std::string strKey) |
| double | ParseDoubleV (const UniValue &v, const std::string &strName) |
| bool | ParseBool (const UniValue &o, std::string strKey) |
| UniValue | help (const JSONRPCRequest &jsonRequest) |
| UniValue | stop (const JSONRPCRequest &jsonRequest) |
| bool | StartRPC () |
| void | InterruptRPC () |
| void | StopRPC () |
| bool | IsRPCRunning () |
| Query whether RPC is running. More... | |
| void | SetRPCWarmupStatus (const std::string &newStatus) |
| Set the RPC warmup status. More... | |
| void | SetRPCWarmupFinished () |
| bool | RPCIsInWarmup (std::string *outStatus) |
| bool | IsDeprecatedRPCEnabled (const std::string &method) |
| std::string | JSONRPCExecBatch (const UniValue &vReq) |
| std::string | HelpExampleCli (std::string methodname, std::string args) |
| std::string | HelpExampleRpc (std::string methodname, std::string args) |
| void | RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface) |
| Set factory function for timers, but only if unset. More... | |
| void | RPCSetTimerInterface (RPCTimerInterface *iface) |
| Set factory function for timers. More... | |
| void | RPCUnsetTimerInterface (RPCTimerInterface *iface) |
| Unset factory function for timers. More... | |
| void | RPCRunLater (const std::string &name, std::function< void(void)> func, int64_t nSeconds) |
| Run func nSeconds from now. More... | |
Variables | |
| CRPCTable | tableRPC |
| UniValue help | ( | const JSONRPCRequest & | jsonRequest | ) |
| std::string HelpExampleCli | ( | std::string | methodname, |
| std::string | args | ||
| ) |
Definition at line 527 of file server.cpp.
| std::string HelpExampleRpc | ( | std::string | methodname, |
| std::string | args | ||
| ) |
Definition at line 532 of file server.cpp.
| void InterruptRPC | ( | ) |
| bool IsDeprecatedRPCEnabled | ( | const std::string & | method | ) |
| bool IsRPCRunning | ( | ) |
Query whether RPC is running.
Definition at line 351 of file server.cpp.
| std::string JSONRPCExecBatch | ( | const UniValue & | vReq | ) |
| bool ParseBool | ( | const UniValue & | o, |
| std::string | strKey | ||
| ) |
| double ParseDoubleV | ( | const UniValue & | v, |
| const std::string & | strName | ||
| ) |
Definition at line 174 of file server.cpp.
Definition at line 147 of file server.cpp.
Utilities: convert hex-encoded Values (throws error if not hex).
Definition at line 138 of file server.cpp.
| std::vector<unsigned char> ParseHexO | ( | const UniValue & | o, |
| std::string | strKey | ||
| ) |
Definition at line 160 of file server.cpp.
| std::vector<unsigned char> ParseHexV | ( | const UniValue & | v, |
| std::string | strName | ||
| ) |
Definition at line 151 of file server.cpp.
| int ParseInt | ( | const UniValue & | o, |
| std::string | strKey | ||
| ) |
| bool RPCIsInWarmup | ( | std::string * | outStatus | ) |
| void RPCRunLater | ( | const std::string & | name, |
| std::function< void(void)> | func, | ||
| int64_t | nSeconds | ||
| ) |
Run func nSeconds from now.
Overrides previous timer <name> (if any).
Definition at line 556 of file server.cpp.
| void RPCSetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Set factory function for timers.
Definition at line 545 of file server.cpp.
| void RPCSetTimerInterfaceIfUnset | ( | RPCTimerInterface * | iface | ) |
Set factory function for timers, but only if unset.
Definition at line 539 of file server.cpp.
| void RPCTypeCheck | ( | const UniValue & | params, |
| const std::list< UniValue::VType > & | typesExpected, | ||
| bool | fAllowNull = false |
||
| ) |
Type-check arguments; throws JSONRPCError if wrong type given.
Does not check that the right number of arguments are passed, just that any passed are the correct type.
Definition at line 63 of file server.cpp.
| void RPCTypeCheckArgument | ( | const UniValue & | value, |
| const UniValueType & | typeExpected | ||
| ) |
Type-check one argument; throws JSONRPCError if wrong type given.
Definition at line 82 of file server.cpp.
| void RPCTypeCheckObj | ( | const UniValue & | o, |
| const std::map< std::string, UniValueType > & | typesExpected, | ||
| bool | fAllowNull, | ||
| bool | fStrict | ||
| ) |
Check for expected keys/value types in an Object.
Definition at line 89 of file server.cpp.
| void RPCUnsetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Unset factory function for timers.
Definition at line 550 of file server.cpp.
| void SetRPCWarmupFinished | ( | ) |
Definition at line 362 of file server.cpp.
| void SetRPCWarmupStatus | ( | const std::string & | newStatus | ) |
Set the RPC warmup status.
When this is done, all RPC calls will error out immediately with RPC_IN_WARMUP.
Definition at line 356 of file server.cpp.
| bool StartRPC | ( | ) |
| UniValue stop | ( | const JSONRPCRequest & | jsonRequest | ) |
| void StopRPC | ( | ) |
Definition at line 343 of file server.cpp.
| CRPCTable tableRPC |
Definition at line 565 of file server.cpp.