Documentation ¶
Index ¶
- func HandleNodeMsg(node Noder, buf []byte, len int) error
- func MsgType(buf []byte) (string, error)
- func NewAddrs(nodeaddrs []NodeAddr, count uint64) ([]byte, error)
- func NewBlock(bk *ledger.Block) ([]byte, error)
- func NewBlockFromHash(hash common.Uint256) (*ledger.Block, error)
- func NewBlocksReq(blocator []Uint256, hash Uint256) ([]byte, error)
- func NewInv(inv *InvPayload) ([]byte, error)
- func NewMsg(t string, n Noder) ([]byte, error)
- func NewNotFound(hash common.Uint256) ([]byte, error)
- func NewPingMsg() ([]byte, error)
- func NewPongMsg() ([]byte, error)
- func NewTxn(txn *transaction.Transaction) ([]byte, error)
- func NewVerack() ([]byte, error)
- func NewVersion(n Noder) ([]byte, error)
- func PayloadLen(buf []byte) int
- func ReqBlkData(node Noder, hash common.Uint256) error
- func SendMsgSyncBlockHeaders(node Noder, blocator []Uint256, hash Uint256)
- func ValidMsgHdr(buf []byte) bool
- type Inv
- type InvPayload
- type Messager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleNodeMsg ¶
FIXME the length exceed int32 case?
func NewBlocksReq ¶
func NewInv ¶
func NewInv(inv *InvPayload) ([]byte, error)
func NewPingMsg ¶
func NewPongMsg ¶
func NewTxn ¶
func NewTxn(txn *transaction.Transaction) ([]byte, error)
func NewVersion ¶
func PayloadLen ¶
func ReqBlkData ¶
func SendMsgSyncBlockHeaders ¶
func SendMsgSyncBlockHeaders(node Noder, blocator []Uint256, hash Uint256)
func ValidMsgHdr ¶
Types ¶
type Inv ¶
type Inv struct { P InvPayload // contains filtered or unexported fields }
func (*Inv) Deserialization ¶
func (Inv) Serialization ¶
type InvPayload ¶
func GetInvFromBlockHash ¶
func GetInvFromBlockHash(startHash Uint256, stopHash Uint256) (*InvPayload, error)
func (*InvPayload) Serialization ¶
func (msg *InvPayload) Serialization(w io.Writer)
Click to show internal directories.
Click to hide internal directories.