Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + const BlockRequestByte + const BlockResponseByte + const BlockchainChannel + const BlocksRequestByte + const BlocksResponseByte + const FilterAddByte + const FilterClearByte + const FilterLoadByte + const HeadersRequestByte + const HeadersResponseByte + const MaxBlockchainResponseSize + const MerkleRequestByte + const MerkleResponseByte + const NewMineBlockByte + const NewTransactionByte + const NewTransactionsByte + const StatusByte + const TxsMsgMaxTxNum + type BlockMessage struct + RawBlock []byte + func NewBlockMessage(block *types.Block) (*BlockMessage, error) + func (m *BlockMessage) GetBlock() (*types.Block, error) + func (m *BlockMessage) String() string + type BlockchainMessage interface + String func() string + type BlocksMessage struct + RawBlocks [][]byte + func NewBlocksMessage(blocks []*types.Block) (*BlocksMessage, error) + func (m *BlocksMessage) GetBlocks() ([]*types.Block, error) + func (m *BlocksMessage) String() string + type FilterAddMessage struct + Address []byte + func (m *FilterAddMessage) String() string + type FilterClearMessage struct + func (m *FilterClearMessage) String() string + type FilterLoadMessage struct + Addresses [][]byte + func (m *FilterLoadMessage) String() string + type GetBlockMessage struct + Height uint64 + RawHash [32]byte + func (m *GetBlockMessage) GetHash() *bc.Hash + func (m *GetBlockMessage) String() string + type GetBlocksMessage struct + RawBlockLocator [][32]byte + RawStopHash [32]byte + func NewGetBlocksMessage(blockLocator []*bc.Hash, stopHash *bc.Hash) *GetBlocksMessage + func (m *GetBlocksMessage) GetBlockLocator() []*bc.Hash + func (m *GetBlocksMessage) GetStopHash() *bc.Hash + func (m *GetBlocksMessage) String() string + type GetHeadersMessage struct + RawBlockLocator [][32]byte + RawStopHash [32]byte + Skip uint64 + func NewGetHeadersMessage(blockLocator []*bc.Hash, stopHash *bc.Hash, skip uint64) *GetHeadersMessage + func (m *GetHeadersMessage) GetBlockLocator() []*bc.Hash + func (m *GetHeadersMessage) GetSkip() uint64 + func (m *GetHeadersMessage) GetStopHash() *bc.Hash + func (m *GetHeadersMessage) String() string + type GetMerkleBlockMessage struct + Height uint64 + RawHash [32]byte + func (m *GetMerkleBlockMessage) GetHash() *bc.Hash + func (m *GetMerkleBlockMessage) String() string + type HeadersMessage struct + RawHeaders [][]byte + func NewHeadersMessage(headers []*types.BlockHeader) (*HeadersMessage, error) + func (m *HeadersMessage) GetHeaders() ([]*types.BlockHeader, error) + func (m *HeadersMessage) String() string + type MerkleBlockMessage struct + Flags []byte + RawBlockHeader []byte + RawTxDatas [][]byte + TxHashes [][32]byte + func NewMerkleBlockMessage() *MerkleBlockMessage + func (m *MerkleBlockMessage) SetRawBlockHeader(bh types.BlockHeader) error + func (m *MerkleBlockMessage) SetTxInfo(txHashes []*bc.Hash, txFlags []uint8, relatedTxs []*types.Tx) error + func (m *MerkleBlockMessage) String() string + type MineBlockMessage struct + RawBlock []byte + func NewMinedBlockMessage(block *types.Block) (*MineBlockMessage, error) + func (m *MineBlockMessage) GetMineBlock() (*types.Block, error) + func (m *MineBlockMessage) String() string + type StatusMessage struct + BestHash [32]byte + BestHeight uint64 + JustifiedHash [32]byte + JustifiedHeight uint64 + func NewStatusMessage(bestHeader, justifiedHeader *types.BlockHeader) *StatusMessage + func (m *StatusMessage) GetBestHash() *bc.Hash + func (m *StatusMessage) GetIrreversibleHash() *bc.Hash + func (m *StatusMessage) String() string + type TransactionMessage struct + RawTx []byte + func NewTransactionMessage(tx *types.Tx) (*TransactionMessage, error) + func (m *TransactionMessage) GetTransaction() (*types.Tx, error) + func (m *TransactionMessage) String() string + type TransactionsMessage struct + RawTxs [][]byte + func NewTransactionsMessage(txs []*types.Tx) (*TransactionsMessage, error) + func (m *TransactionsMessage) GetTransactions() ([]*types.Tx, error) + func (m *TransactionsMessage) String() string