Bitcoin Core  0.19.99
P2P Digital Currency
Classes | Macros | Functions | Variables
bitcoin-cli.cpp File Reference
#include <chainparamsbase.h>
#include <clientversion.h>
#include <rpc/client.h>
#include <rpc/protocol.h>
#include <rpc/request.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <util/translation.h>
#include <functional>
#include <memory>
#include <stdio.h>
#include <tuple>
#include <event2/buffer.h>
#include <event2/keyvalq_struct.h>
#include <support/events.h>
#include <univalue.h>
#include <compat/stdin.h>
Include dependency graph for bitcoin-cli.cpp:

Go to the source code of this file.

Classes

class  CConnectionFailed
 
struct  HTTPReply
 Reply structure for request_done to fill in. More...
 
class  BaseRequestHandler
 Class that handles the conversion from a command-line to a JSON-RPC request, as well as converting back to a JSON object that can be shown as result. More...
 
class  GetinfoRequestHandler
 Process getinfo requests. More...
 
class  DefaultRequestHandler
 Process default single requests. More...
 

Macros

#define EVENT_LOG_ERR   _EVENT_LOG_ERR
 

Functions

static void SetupCliArgs ()
 
static void libevent_log_cb (int severity, const char *msg)
 libevent event log callback More...
 
static int AppInitRPC (int argc, char *argv[])
 
static const char * http_errorstring (int code)
 
static void http_request_done (struct evhttp_request *req, void *ctx)
 
static UniValue CallRPC (BaseRequestHandler *rh, const std::string &strMethod, const std::vector< std::string > &args)
 
static int CommandLineRPC (int argc, char *argv[])
 
int main (int argc, char *argv[])
 

Variables

const std::function< std::string(const char *)> G_TRANSLATION_FUN = nullptr
 Translate string to current locale using Qt. More...
 
static const char DEFAULT_RPCCONNECT [] = "127.0.0.1"
 
static const int DEFAULT_HTTP_CLIENT_TIMEOUT =900
 
static const bool DEFAULT_NAMED =false
 
static const int CONTINUE_EXECUTION =-1
 

Macro Definition Documentation

◆ EVENT_LOG_ERR

#define EVENT_LOG_ERR   _EVENT_LOG_ERR

Function Documentation

◆ AppInitRPC()

static int AppInitRPC ( int  argc,
char *  argv[] 
)
static

Definition at line 100 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CallRPC()

static UniValue CallRPC ( BaseRequestHandler rh,
const std::string &  strMethod,
const std::vector< std::string > &  args 
)
static

Definition at line 301 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineRPC()

static int CommandLineRPC ( int  argc,
char *  argv[] 
)
static

Definition at line 415 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ http_errorstring()

static const char* http_errorstring ( int  code)
static

Definition at line 158 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ http_request_done()

static void http_request_done ( struct evhttp_request *  req,
void *  ctx 
)
static

Definition at line 180 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ libevent_log_cb()

static void libevent_log_cb ( int  severity,
const char *  msg 
)
static

libevent event log callback

Definition at line 66 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 548 of file bitcoin-cli.cpp.

Here is the call graph for this function:

◆ SetupCliArgs()

static void SetupCliArgs ( )
static

Definition at line 38 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CONTINUE_EXECUTION

const int CONTINUE_EXECUTION =-1
static

Definition at line 36 of file bitcoin-cli.cpp.

◆ DEFAULT_HTTP_CLIENT_TIMEOUT

const int DEFAULT_HTTP_CLIENT_TIMEOUT =900
static

Definition at line 34 of file bitcoin-cli.cpp.

◆ DEFAULT_NAMED

const bool DEFAULT_NAMED =false
static

Definition at line 35 of file bitcoin-cli.cpp.

◆ DEFAULT_RPCCONNECT

const char DEFAULT_RPCCONNECT[] = "127.0.0.1"
static

Definition at line 33 of file bitcoin-cli.cpp.

◆ G_TRANSLATION_FUN

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr

Translate string to current locale using Qt.

Translate a message to the native language of the user.

Definition at line 31 of file bitcoin-cli.cpp.