mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 07:15:29 +01:00
[trivial] Extract connection type doc into file where it is used.
This slightly reduces the size of the binary.
This commit is contained in:
parent
3069b56a45
commit
41dca087b7
2 changed files with 13 additions and 9 deletions
13
src/net.h
13
src/net.h
|
@ -116,17 +116,12 @@ struct CSerializedNetMsg
|
||||||
std::string m_type;
|
std::string m_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<std::string> CONNECTION_TYPE_DOC{
|
|
||||||
"outbound-full-relay (default automatic connections)",
|
|
||||||
"block-relay-only (does not relay transactions or addresses)",
|
|
||||||
"inbound (initiated by the peer)",
|
|
||||||
"manual (added via addnode RPC or -addnode/-connect configuration options)",
|
|
||||||
"addr-fetch (short-lived automatic connection for soliciting addresses)",
|
|
||||||
"feeler (short-lived automatic connection for testing addresses)"};
|
|
||||||
|
|
||||||
/** Different types of connections to a peer. This enum encapsulates the
|
/** Different types of connections to a peer. This enum encapsulates the
|
||||||
* information we have available at the time of opening or accepting the
|
* information we have available at the time of opening or accepting the
|
||||||
* connection. Aside from INBOUND, all types are initiated by us. */
|
* connection. Aside from INBOUND, all types are initiated by us.
|
||||||
|
*
|
||||||
|
* If adding or removing types, please update CONNECTION_TYPE_DOC in
|
||||||
|
* src/rpc/net.cpp. */
|
||||||
enum class ConnectionType {
|
enum class ConnectionType {
|
||||||
/**
|
/**
|
||||||
* Inbound connections are those initiated by a peer. This is the only
|
* Inbound connections are those initiated by a peer. This is the only
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
|
|
||||||
#include <univalue.h>
|
#include <univalue.h>
|
||||||
|
|
||||||
|
const std::vector<std::string> CONNECTION_TYPE_DOC{
|
||||||
|
"outbound-full-relay (default automatic connections)",
|
||||||
|
"block-relay-only (does not relay transactions or addresses)",
|
||||||
|
"inbound (initiated by the peer)",
|
||||||
|
"manual (added via addnode RPC or -addnode/-connect configuration options)",
|
||||||
|
"addr-fetch (short-lived automatic connection for soliciting addresses)",
|
||||||
|
"feeler (short-lived automatic connection for testing addresses)"
|
||||||
|
};
|
||||||
|
|
||||||
static RPCHelpMan getconnectioncount()
|
static RPCHelpMan getconnectioncount()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"getconnectioncount",
|
return RPCHelpMan{"getconnectioncount",
|
||||||
|
|
Loading…
Add table
Reference in a new issue