Bitcoin
Variables
NetMsgType Namespace Reference

Variables

const char * VERSION ="version"
 
const char * VERACK ="verack"
 
const char * ADDR ="addr"
 
const char * INV ="inv"
 
const char * GETDATA ="getdata"
 
const char * MERKLEBLOCK ="merkleblock"
 
const char * GETBLOCKS ="getblocks"
 
const char * GETHEADERS ="getheaders"
 
const char * TX ="tx"
 
const char * HEADERS ="headers"
 
const char * BLOCK ="block"
 
const char * GETADDR ="getaddr"
 
const char * MEMPOOL ="mempool"
 
const char * PING ="ping"
 
const char * PONG ="pong"
 
const char * NOTFOUND ="notfound"
 
const char * FILTERLOAD ="filterload"
 
const char * FILTERADD ="filteradd"
 
const char * FILTERCLEAR ="filterclear"
 
const char * REJECT ="reject"
 
const char * SENDHEADERS ="sendheaders"
 
const char * FEEFILTER ="feefilter"
 
const char * SENDCMPCT ="sendcmpct"
 
const char * CMPCTBLOCK ="cmpctblock"
 
const char * GETBLOCKTXN ="getblocktxn"
 
const char * BLOCKTXN ="blocktxn"
 

Detailed Description

Bitcoin protocol message types. When adding new message types, don't forget to update allNetMessageTypes in protocol.cpp.

Variable Documentation

◆ ADDR

const char * NetMsgType::ADDR ="addr"

The addr (IP address) message relays connection information for peers on the network.

See also
https://bitcoin.org/en/developer-reference#addr

◆ BLOCK

const char * NetMsgType::BLOCK ="block"

The block message transmits a single serialized block.

See also
https://bitcoin.org/en/developer-reference#block

◆ BLOCKTXN

const char * NetMsgType::BLOCKTXN ="blocktxn"

Contains a BlockTransactions. Sent in response to a "getblocktxn" message.

Since
protocol version 70014 as described by BIP 152

◆ CMPCTBLOCK

const char * NetMsgType::CMPCTBLOCK ="cmpctblock"

Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids".

Since
protocol version 70014 as described by BIP 152

◆ FEEFILTER

const char * NetMsgType::FEEFILTER ="feefilter"

The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified min fee rate.

Since
protocol version 70013 as described by BIP133

◆ FILTERADD

const char * NetMsgType::FILTERADD ="filteradd"

The filteradd message tells the receiving peer to add a single element to a previously-set bloom filter, such as a new public key.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.
See also
https://bitcoin.org/en/developer-reference#filteradd

◆ FILTERCLEAR

const char * NetMsgType::FILTERCLEAR ="filterclear"

The filterclear message tells the receiving peer to remove a previously-set bloom filter.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.
See also
https://bitcoin.org/en/developer-reference#filterclear

◆ FILTERLOAD

const char * NetMsgType::FILTERLOAD ="filterload"

The filterload message tells the receiving peer to filter all relayed transactions and requested merkle blocks through the provided filter.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.
See also
https://bitcoin.org/en/developer-reference#filterload

◆ GETADDR

const char * NetMsgType::GETADDR ="getaddr"

The getaddr message requests an addr message from the receiving node, preferably one with lots of IP addresses of other receiving nodes.

See also
https://bitcoin.org/en/developer-reference#getaddr

◆ GETBLOCKS

const char * NetMsgType::GETBLOCKS ="getblocks"

The getblocks message requests an inv message that provides block header hashes starting from a particular point in the block chain.

See also
https://bitcoin.org/en/developer-reference#getblocks

◆ GETBLOCKTXN

const char * NetMsgType::GETBLOCKTXN ="getblocktxn"

Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.

Since
protocol version 70014 as described by BIP 152

◆ GETDATA

const char * NetMsgType::GETDATA ="getdata"

The getdata message requests one or more data objects from another node.

See also
https://bitcoin.org/en/developer-reference#getdata

◆ GETHEADERS

const char * NetMsgType::GETHEADERS ="getheaders"

The getheaders message requests a headers message that provides block headers starting from a particular point in the block chain.

Since
protocol version 31800.
See also
https://bitcoin.org/en/developer-reference#getheaders

◆ HEADERS

const char * NetMsgType::HEADERS ="headers"

The headers message sends one or more block headers to a node which previously requested certain headers with a getheaders message.

Since
protocol version 31800.
See also
https://bitcoin.org/en/developer-reference#headers

◆ INV

const char * NetMsgType::INV ="inv"

The inv message (inventory message) transmits one or more inventories of objects known to the transmitting peer.

See also
https://bitcoin.org/en/developer-reference#inv

◆ MEMPOOL

const char * NetMsgType::MEMPOOL ="mempool"

The mempool message requests the TXIDs of transactions that the receiving node has verified as valid but which have not yet appeared in a block.

Since
protocol version 60002.
See also
https://bitcoin.org/en/developer-reference#mempool

◆ MERKLEBLOCK

const char * NetMsgType::MERKLEBLOCK ="merkleblock"

The merkleblock message is a reply to a getdata message which requested a block using the inventory type MSG_MERKLEBLOCK.

Since
protocol version 70001 as described by BIP37.
See also
https://bitcoin.org/en/developer-reference#merkleblock

◆ NOTFOUND

const char * NetMsgType::NOTFOUND ="notfound"

The notfound message is a reply to a getdata message which requested an object the receiving node does not have available for relay.

Since
protocol version 70001.
See also
https://bitcoin.org/en/developer-reference#notfound

◆ PING

const char * NetMsgType::PING ="ping"

The ping message is sent periodically to help confirm that the receiving peer is still connected.

See also
https://bitcoin.org/en/developer-reference#ping

◆ PONG

const char * NetMsgType::PONG ="pong"

The pong message replies to a ping message, proving to the pinging node that the ponging node is still alive.

Since
protocol version 60001 as described by BIP31.
See also
https://bitcoin.org/en/developer-reference#pong

◆ REJECT

const char * NetMsgType::REJECT ="reject"

The reject message informs the receiving node that one of its previous messages has been rejected.

Since
protocol version 70002 as described by BIP61.
See also
https://bitcoin.org/en/developer-reference#reject

◆ SENDCMPCT

const char * NetMsgType::SENDCMPCT ="sendcmpct"

Contains a 1-byte bool and 8-byte LE version number. Indicates that a node is willing to provide blocks via "cmpctblock" messages. May indicate that a node prefers to receive new block announcements via a "cmpctblock" message rather than an "inv", depending on message contents.

Since
protocol version 70014 as described by BIP 152

◆ SENDHEADERS

const char * NetMsgType::SENDHEADERS ="sendheaders"

Indicates that a node prefers to receive new block announcements via a "headers" message rather than an "inv".

Since
protocol version 70012 as described by BIP130.
See also
https://bitcoin.org/en/developer-reference#sendheaders

◆ TX

const char * NetMsgType::TX ="tx"

The tx message transmits a single transaction.

See also
https://bitcoin.org/en/developer-reference#tx

◆ VERACK

const char * NetMsgType::VERACK ="verack"

The verack message acknowledges a previously-received version message, informing the connecting node that it can begin to send other messages.

See also
https://bitcoin.org/en/developer-reference#verack

◆ VERSION

const char * NetMsgType::VERSION ="version"

The version message provides information about the transmitting node to the receiving node at the beginning of a connection.

See also
https://bitcoin.org/en/developer-reference#version