Documentation ¶
Index ¶
Constants ¶
View Source
const Size = 15
Size is the size of a topic field in bytes
Variables ¶
This section is empty.
Functions ¶
func TopicToByteArray ¶
TopicToByteArray turns a Topic to a byte array of size 15, to prepare it for sending over the wire protocol.
Types ¶
type Topic ¶
type Topic string
Topic defines a topic
const ( // Standard topics Version Topic = "version" VerAck Topic = "verack" Ping Topic = "ping" Pong Topic = "pong" // Data exchange topics Addr Topic = "addr" GetAddr Topic = "getaddr" GetData Topic = "getdata" GetBlocks Topic = "getblocks" GetHeaders Topic = "getheaders" Tx Topic = "tx" Block Topic = "block" AcceptedBlock Topic = "acceptedblock" Headers Topic = "headers" MemPool Topic = "mempool" Inv Topic = "inv" Certificate Topic = "certificate" // Consensus topics Candidate Topic = "candidate" Score Topic = "score" Reduction Topic = "blockreduction" Agreement Topic = "blockagreement" StartConsensus Topic = "startconsensus" // Peer topics Gossip Topic = "gossip" // Blockchain topics ChainInfo Topic = "chaininfo" // RPC topics RPCChainInfo Topic = "rpcchaininfo" // Error topics NotFound Topic = "notfound" Reject Topic = "reject" )
A list of all valid topics
func ByteArrayToTopic ¶
ByteArrayToTopic turns a byte array of size 15 into a Topic, for populating a received message header.
Click to show internal directories.
Click to hide internal directories.