dpos_msg

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ETOnArbiter          events.EventType = 2001
	ETRequireArbiter     events.EventType = 2002
	ETReqArbiterSig      events.EventType = 2003
	ETFeedBackArbiterSig events.EventType = 2004
	ETESCStateChanged    events.EventType = 2005
)

Constants for the type of a notification message.

View Source
const (
	CmdDArbiter                 = "arbiter"
	CmdRequireArbiters          = "req_arbiter"
	CmdRequireArbitersSignature = "req_a_sig"
	CmdFeedbackArbiterSignature = "ret_a_sig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DArbiter

type DArbiter struct {
	// The peer ID indicates who's address it is.
	PID [33]byte

	// Timestamp represents the time when this message created.
	Timestamp time.Time

	// Which peer ID is used to encode the address cipher.
	Encode [33]byte

	// The encrypted network address using the encode peer ID.
	Cipher []byte

	// Signature of the encode peer ID and cipher to proof the sender itself.
	Signature []byte

	// is current consensus producers
	IsCurrent bool
}

func (*DArbiter) CMD

func (m *DArbiter) CMD() string

func (*DArbiter) Data

func (m *DArbiter) Data() []byte

func (*DArbiter) Deserialize

func (m *DArbiter) Deserialize(r io.Reader) error

func (*DArbiter) MaxLength

func (m *DArbiter) MaxLength() uint32

func (*DArbiter) Serialize

func (m *DArbiter) Serialize(w io.Writer) error

type FeedBackArbitersSignature

type FeedBackArbitersSignature struct {
	Producer  []byte
	Signature []byte
}

func (*FeedBackArbitersSignature) CMD

func (*FeedBackArbitersSignature) Deserialize

func (m *FeedBackArbitersSignature) Deserialize(r io.Reader) error

func (*FeedBackArbitersSignature) MaxLength

func (m *FeedBackArbitersSignature) MaxLength() uint32

func (*FeedBackArbitersSignature) Serialize

func (m *FeedBackArbitersSignature) Serialize(w io.Writer) error

type RequireArbiter

type RequireArbiter struct {
	PID       [33]byte
	IsCurrent bool
}

func (*RequireArbiter) CMD

func (msg *RequireArbiter) CMD() string

func (*RequireArbiter) Deserialize

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

func (*RequireArbiter) MaxLength

func (msg *RequireArbiter) MaxLength() uint32

func (*RequireArbiter) Serialize

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

type RequireArbitersSignature

type RequireArbitersSignature struct {
	PID          [33]byte
	ArbiterCount uint8
}

func (*RequireArbitersSignature) CMD

func (msg *RequireArbitersSignature) CMD() string

func (*RequireArbitersSignature) Deserialize

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

func (*RequireArbitersSignature) MaxLength

func (msg *RequireArbitersSignature) MaxLength() uint32

func (*RequireArbitersSignature) Serialize

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

Jump to

Keyboard shortcuts

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