11 : pchMessageStart{pchMessageStartIn}
15 for (; i < MESSAGE_TYPE_SIZE && msg_type[i] != 0; ++i) m_msg_type[i] = msg_type[i];
18 nMessageSize = nMessageSizeIn;
37 }
else if (*p1 < ' ' || *p1 > 0x7E) {
62 cmd.append(
"witness-");
73 throw std::out_of_range(
strprintf(
"CInv::GetMessageType(): type=%d unknown type",
type));
81 }
catch(
const std::out_of_range &) {
93 const uint64_t service_flag = 1ULL << bit;
110 std::vector<std::string> str_flags;
112 for (
size_t i = 0; i <
sizeof(
flags) * 8; ++i) {
113 if (
flags & (1ULL << i)) {
static GenTxid Wtxid(const uint256 &hash)
ServiceFlags
nServices flags
std::string ToString() const
std::vector< std::string > serviceFlagsToStr(uint64_t flags)
Convert service flags (a bitmask of NODE_*) to human readable strings.
const uint32_t MSG_WITNESS_FLAG
getdata message type flags
const uint32_t MSG_TYPE_MASK
std::array< uint8_t, 4 > MessageStartChars
GenTxid ToGenTxid(const CInv &inv)
Convert a TX/WITNESS_TX/WTX CInv to a GenTxid.
constexpr const char * MERKLEBLOCK
The merkleblock message is a reply to a getdata message which requested a block using the inventory t...
bool operator<(const CInv &a, const CInv &b)
std::string ToString() const
constexpr const char * BLOCK
The block message transmits a single serialized block.
static std::string serviceFlagToStr(size_t bit)
Convert a service flag (NODE_*) to a human readable string.
constexpr const char * CMPCTBLOCK
Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids"...
constexpr const char * TX
The tx message transmits a single transaction.
std::string GetMessageType() const
A generic txid reference (txid or wtxid).
static GenTxid Txid(const uint256 &hash)