Versions in this module Expand all Collapse all v1 v1.4.2 May 30, 2023 v1.4.0 May 30, 2023 Changes in this version + const BlocksPerRequest + const RequestSyncMatchineState + const RequestTypeBlockCollection + const RequestTypeConfirmation + const RequestTypeHonorNode + const RequestTypeMaxBlock + const RequestTypeNotHonorNode + const RequestTypeStopNetwork + const RequestTypeVoting + var ErrMaxSize = errors.New("Size greater than max size") + var ErrNotAccepted = errors.New("Not accepted") + func ReadInt(r io.Reader) (int64, error) + func ReadSlice(r io.Reader) ([]byte, error) + func ReadSliceWithMaxSize(r io.Reader, maxSize uint64) ([]byte, error) + func SendRequestType(reqType int64, w io.Writer) error + func WriteInt(value int64, w io.Writer) error + type BroadcastNodeConnInfoRequest struct + Data []byte + func (req *BroadcastNodeConnInfoRequest) Read(r io.Reader) error + func (req *BroadcastNodeConnInfoRequest) Write(w io.Writer) error + type BroadcastNodeConnInfoResponse struct + Data []byte + func (resp *BroadcastNodeConnInfoResponse) Read(r io.Reader) error + func (resp *BroadcastNodeConnInfoResponse) Write(w io.Writer) error + type CandidateNodeVotingRequest struct + Data []byte + func (req *CandidateNodeVotingRequest) Read(r io.Reader) error + func (req *CandidateNodeVotingRequest) Write(w io.Writer) error + type CandidateNodeVotingResponse struct + Data []byte + func (resp *CandidateNodeVotingResponse) Read(r io.Reader) error + func (resp *CandidateNodeVotingResponse) Write(w io.Writer) error + type ConfirmRequest struct + BlockID uint32 + func (req *ConfirmRequest) Read(r io.Reader) error + func (req *ConfirmRequest) Write(w io.Writer) error + type ConfirmResponse struct + Hash []byte + func (resp *ConfirmResponse) Read(r io.Reader) error + func (resp *ConfirmResponse) Write(w io.Writer) error + type DisHashResponse struct + Data []byte + func (resp *DisHashResponse) Read(r io.Reader) error + func (resp *DisHashResponse) Write(w io.Writer) error + type DisRequest struct + Data []byte + func (req *DisRequest) Read(r io.Reader) error + func (req *DisRequest) Write(w io.Writer) error + type GetBodiesRequest struct + BlockID uint32 + ReverseOrder bool + func (req *GetBodiesRequest) Read(r io.Reader) error + func (req *GetBodiesRequest) Write(w io.Writer) error + type GetBodyResponse struct + Data []byte + func (resp *GetBodyResponse) Read(r io.Reader) error + func (resp *GetBodyResponse) Write(w io.Writer) error + type MaxBlockResponse struct + BlockID int64 + func (resp *MaxBlockResponse) Read(r io.Reader) error + func (resp *MaxBlockResponse) Write(w io.Writer) error + type ReqTypesFlag uint16 + type RequestType struct + Type ReqTypesFlag + func (rt *RequestType) Read(r io.Reader) error + func (rt *RequestType) Write(w io.Writer) error + type SelfReaderWriter interface + Read func(io.Reader) error + Write func(io.Writer) error + type StopNetworkRequest struct + Data []byte + func (req *StopNetworkRequest) Read(r io.Reader) error + func (req *StopNetworkRequest) Write(w io.Writer) error + type StopNetworkResponse struct + Hash []byte + func (resp *StopNetworkResponse) Read(r io.Reader) error + func (resp *StopNetworkResponse) Write(w io.Writer) error + type VoteMsg struct + Agree bool + CurrentBlockHeight int64 + EcosystemID int64 + Hash []byte + LocalAddress string + Msg string + Sign []byte + TcpAddress string + Time int64 + func (voteMsg *VoteMsg) VerifyVoteForSign() string + func (voteMsg *VoteMsg) VoteForSign() string