Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Topics = [...]topicBuf{ {Version, *(bytes.NewBuffer([]byte{byte(Version)})), "version"}, {VerAck, *(bytes.NewBuffer([]byte{byte(VerAck)})), "verack"}, {Ping, *(bytes.NewBuffer([]byte{byte(Ping)})), "ping"}, {Pong, *(bytes.NewBuffer([]byte{byte(Pong)})), "pong"}, {GetData, *(bytes.NewBuffer([]byte{byte(GetData)})), "getdata"}, {GetBlocks, *(bytes.NewBuffer([]byte{byte(GetBlocks)})), "getblocks"}, {Tx, *(bytes.NewBuffer([]byte{byte(Tx)})), "tx"}, {Block, *(bytes.NewBuffer([]byte{byte(Block)})), "block"}, {AcceptedBlock, *(bytes.NewBuffer([]byte{byte(AcceptedBlock)})), "acceptedblock"}, {MemPool, *(bytes.NewBuffer([]byte{byte(MemPool)})), "mempool"}, {Inv, *(bytes.NewBuffer([]byte{byte(Inv)})), "inv"}, {Candidate, *(bytes.NewBuffer([]byte{byte(Candidate)})), "candidate"}, {Score, *(bytes.NewBuffer([]byte{byte(Score)})), "score"}, {Reduction, *(bytes.NewBuffer([]byte{byte(Reduction)})), "reduction"}, {Agreement, *(bytes.NewBuffer([]byte{byte(Agreement)})), "agreement"}, {Gossip, *(bytes.NewBuffer([]byte{byte(Gossip)})), "gossip"}, {Unknown, *(bytes.NewBuffer([]byte{byte(Unknown)})), "unknown"}, {Reject, *(bytes.NewBuffer([]byte{byte(Reject)})), "reject"}, {Quit, *(bytes.NewBuffer([]byte{byte(Quit)})), "quit"}, {Log, *(bytes.NewBuffer([]byte{byte(Log)})), "log"}, {Monitor, *(bytes.NewBuffer([]byte{byte(Log)})), "monitor_topic"}, {Test, *(bytes.NewBuffer([]byte{byte(Test)})), "__test"}, {GetMempoolTxs, *(bytes.NewBuffer([]byte{byte(GetMempoolTxs)})), "getmempooltxs"}, {GetMempoolTxsBySize, *(bytes.NewBuffer([]byte{byte(GetMempoolTxsBySize)})), "getmempooltxsbysize"}, {SendMempoolTx, *(bytes.NewBuffer([]byte{byte(SendMempoolTx)})), "sendmempooltx"}, {VerifyStateTransition, *(bytes.NewBuffer([]byte{byte(VerifyStateTransition)})), "validatestatetransition"}, {ExecuteStateTransition, *(bytes.NewBuffer([]byte{byte(ExecuteStateTransition)})), "executestatetransition"}, {GetMempoolView, *(bytes.NewBuffer([]byte{byte(GetMempoolView)})), "getmempoolview"}, {SendBidTx, *(bytes.NewBuffer([]byte{byte(SendBidTx)})), "sendbidtx"}, {SendStakeTx, *(bytes.NewBuffer([]byte{byte(SendStakeTx)})), "sendstaketx"}, {SendStandardTx, *(bytes.NewBuffer([]byte{byte(SendStandardTx)})), "sendstandardtx"}, {GetBalance, *(bytes.NewBuffer([]byte{byte(GetBalance)})), "getbalance"}, {GetUnconfirmedBalance, *(bytes.NewBuffer([]byte{byte(GetUnconfirmedBalance)})), "getunconfirmedbalance"}, {GetAddress, *(bytes.NewBuffer([]byte{byte(GetAddress)})), "getaddress"}, {GetTxHistory, *(bytes.NewBuffer([]byte{byte(GetTxHistory)})), "gettxhistory"}, {AutomateConsensusTxs, *(bytes.NewBuffer([]byte{byte(AutomateConsensusTxs)})), "automateconsensustxs"}, {GetSyncProgress, *(bytes.NewBuffer([]byte{byte(GetSyncProgress)})), "getsyncprogress"}, {RebuildChain, *(bytes.NewBuffer([]byte{byte(RebuildChain)})), "rebuildchain"}, {ClearWalletDatabase, *(bytes.NewBuffer([]byte{byte(ClearWalletDatabase)})), "clearwalletdatabase"}, {StartProfile, *(bytes.NewBuffer([]byte{byte(StartProfile)})), "startprofile"}, {StopProfile, *(bytes.NewBuffer([]byte{byte(StopProfile)})), "stopprofile"}, {GetCandidate, *(bytes.NewBuffer([]byte{byte(GetCandidate)})), "getcandidate"}, {SyncProgress, *(bytes.NewBuffer([]byte{byte(SyncProgress)})), "syncprogress"}, {Kadcast, *(bytes.NewBuffer([]byte{byte(Kadcast)})), "kadcast"}, }
Topics represents the associated string and byte representation respectively of the Topic objects. NOTE: this needs to be in the same order in which the topics are declared.
Functions ¶
Types ¶
type Topic ¶
type Topic uint8
Topic defines a topic.
const ( // Standard topics. Version Topic = iota VerAck Ping Pong // Data exchange topics. GetData GetBlocks Tx Block AcceptedBlock MemPool Inv // Gossiped topics. Candidate Score Reduction Agreement // Peer topics. Gossip // Error topics. Unknown Reject // Internal. Quit Log Monitor Test // RPCBus topics. GetMempoolTxs GetMempoolTxsBySize SendMempoolTx VerifyStateTransition ExecuteStateTransition // Cross-process RPCBus topics. GetMempoolView SendBidTx SendStakeTx SendStandardTx GetBalance GetUnconfirmedBalance GetAddress GetTxHistory AutomateConsensusTxs GetSyncProgress RebuildChain ClearWalletDatabase StartProfile StopProfile // Cross-network RPCBus topics. GetCandidate // Monitoring topics. SyncProgress // Kadcast wire messaging. Kadcast )
A list of all valid topics.
func StringToTopic ¶ added in v0.2.0
StringToTopic turns a string into a Topic if the Topic is in the enum of known topics. Return Unknown topic if the string is not coupled with any of them.
Click to show internal directories.
Click to hide internal directories.