msg

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	CmdConfirm = "confirm"
)
View Source
const DefaultResponseConsensusMessageDataSize = 8000000 * 10

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockMsg

type BlockMsg struct {
	// contains filtered or unexported fields
}

func NewBlockMsg

func NewBlockMsg(data []byte) *BlockMsg

func (*BlockMsg) CMD

func (msg *BlockMsg) CMD() string

func (*BlockMsg) Deserialize

func (msg *BlockMsg) Deserialize(r io.Reader) error

func (*BlockMsg) GetData

func (msg *BlockMsg) GetData() []byte

func (*BlockMsg) MaxLength

func (msg *BlockMsg) MaxLength() uint32

func (*BlockMsg) Serialize

func (msg *BlockMsg) Serialize(w io.Writer) error

type ConfirmMsg

type ConfirmMsg struct {
	Confirm *payload.Confirm
	Height  uint64
}

func NewConfirmMsg

func NewConfirmMsg(confirm *payload.Confirm, height uint64) *ConfirmMsg

func (*ConfirmMsg) CMD

func (msg *ConfirmMsg) CMD() string

func (*ConfirmMsg) Deserialize

func (msg *ConfirmMsg) Deserialize(r io.Reader) error

func (*ConfirmMsg) MaxLength

func (msg *ConfirmMsg) MaxLength() uint32

func (*ConfirmMsg) Serialize

func (msg *ConfirmMsg) Serialize(w io.Writer) error

type ConsensusStatus

type ConsensusStatus struct {
	ConsensusStatus uint32
	ViewOffset      uint32
	ViewStartTime   time.Time

	AcceptVotes      []payload.DPOSProposalVote
	RejectedVotes    []payload.DPOSProposalVote
	PendingProposals []payload.DPOSProposal
	PendingVotes     []payload.DPOSProposalVote

	WorkingHeight uint64
}

func (*ConsensusStatus) Deserialize

func (s *ConsensusStatus) Deserialize(r io.Reader) error

func (*ConsensusStatus) Serialize

func (s *ConsensusStatus) Serialize(w io.Writer) error

type RequestConsensus

type RequestConsensus struct {
	Height uint64
}

func (*RequestConsensus) CMD

func (msg *RequestConsensus) CMD() string

func (*RequestConsensus) Deserialize

func (msg *RequestConsensus) Deserialize(r io.Reader) error

func (*RequestConsensus) MaxLength

func (msg *RequestConsensus) MaxLength() uint32

func (*RequestConsensus) Serialize

func (msg *RequestConsensus) Serialize(w io.Writer) error

type ResponseConsensus

type ResponseConsensus struct {
	Consensus ConsensusStatus
}

func (*ResponseConsensus) CMD

func (msg *ResponseConsensus) CMD() string

func (*ResponseConsensus) Deserialize

func (msg *ResponseConsensus) Deserialize(r io.Reader) error

func (*ResponseConsensus) MaxLength

func (msg *ResponseConsensus) MaxLength() uint32

func (*ResponseConsensus) Serialize

func (msg *ResponseConsensus) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL