Bitcoin Core 28.99.0
P2P Digital Currency
Functions
protocol.cpp File Reference
#include <protocol.h>
#include <common/system.h>
Include dependency graph for protocol.cpp:

Go to the source code of this file.

Functions

bool operator< (const CInv &a, const CInv &b)
 
static std::string serviceFlagToStr (size_t bit)
 Convert a service flag (NODE_*) to a human readable string. More...
 
std::vector< std::string > serviceFlagsToStr (uint64_t flags)
 Convert service flags (a bitmask of NODE_*) to human readable strings. More...
 
GenTxid ToGenTxid (const CInv &inv)
 Convert a TX/WITNESS_TX/WTX CInv to a GenTxid. More...
 

Function Documentation

◆ operator<()

bool operator< ( const CInv a,
const CInv b 
)

Definition at line 53 of file protocol.cpp.

◆ serviceFlagsToStr()

std::vector< std::string > serviceFlagsToStr ( uint64_t  flags)

Convert service flags (a bitmask of NODE_*) to human readable strings.

It supports unknown service flags which will be returned as "UNKNOWN[...]".

Parameters
[in]flagsmultiple NODE_* bitwise-OR-ed together

Definition at line 108 of file protocol.cpp.

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

◆ serviceFlagToStr()

static std::string serviceFlagToStr ( size_t  bit)
static

Convert a service flag (NODE_*) to a human readable string.

It supports unknown service flags which will be returned as "UNKNOWN[...]".

Parameters
[in]bitthe service flag is calculated as (1 << bit)

Definition at line 91 of file protocol.cpp.

Here is the caller graph for this function:

◆ ToGenTxid()

GenTxid ToGenTxid ( const CInv inv)

Convert a TX/WITNESS_TX/WTX CInv to a GenTxid.

Definition at line 121 of file protocol.cpp.

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