message_def

package
v0.0.0-...-4701ab3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: LGPL-3.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlockGenMessageType    = message.DefineType("fleta.BlockGen")
	BlockObSignMessageType = message.DefineType("fleta.BlockObSign")
	BlockReqMessageType    = message.DefineType("fleta.BlockReq")
	TransactionMessageType = message.DefineType("fleta.Transaction")
	PingMessageType        = message.DefineType("fleta.Ping")
)

types

Functions

This section is empty.

Types

type BlockGenMessage

type BlockGenMessage struct {
	Block              *block.Block
	GeneratorSignature common.Signature
	IsReply            bool
	Tran               *data.Transactor
}

BlockGenMessage is a message for a block generation

func (*BlockGenMessage) ReadFrom

func (b *BlockGenMessage) ReadFrom(r io.Reader) (int64, error)

ReadFrom is a deserialization function

func (*BlockGenMessage) Type

func (b *BlockGenMessage) Type() message.Type

Type returns the type of the message

func (*BlockGenMessage) WriteTo

func (b *BlockGenMessage) WriteTo(w io.Writer) (int64, error)

WriteTo is a serialization function

type BlockObSignMessage

type BlockObSignMessage struct {
	TargetHeight   uint32
	ObserverSigned *block.ObserverSigned
}

BlockObSignMessage is a message for a block observer signatures

func (*BlockObSignMessage) ReadFrom

func (b *BlockObSignMessage) ReadFrom(r io.Reader) (int64, error)

ReadFrom is a deserialization function

func (*BlockObSignMessage) Type

func (b *BlockObSignMessage) Type() message.Type

Type returns the type of the message

func (*BlockObSignMessage) WriteTo

func (b *BlockObSignMessage) WriteTo(w io.Writer) (int64, error)

WriteTo is a serialization function

type BlockReqMessage

type BlockReqMessage struct {
	PrevHash             hash.Hash256
	TargetHeight         uint32
	TimeoutCount         uint32
	Formulator           common.Address
	FormulatorPublicHash common.PublicHash
}

BlockReqMessage is a message for a block request

func (*BlockReqMessage) ReadFrom

func (b *BlockReqMessage) ReadFrom(r io.Reader) (int64, error)

ReadFrom is a deserialization function

func (*BlockReqMessage) Type

func (b *BlockReqMessage) Type() message.Type

Type returns the type of the message

func (*BlockReqMessage) WriteTo

func (b *BlockReqMessage) WriteTo(w io.Writer) (int64, error)

WriteTo is a serialization function

type PingMessage

type PingMessage struct {
}

PingMessage is a message for a block generation

func (*PingMessage) ReadFrom

func (b *PingMessage) ReadFrom(r io.Reader) (int64, error)

ReadFrom is a deserialization function

func (*PingMessage) Type

func (b *PingMessage) Type() message.Type

Type returns the type of the message

func (*PingMessage) WriteTo

func (b *PingMessage) WriteTo(w io.Writer) (int64, error)

WriteTo is a serialization function

type TransactionMessage

type TransactionMessage struct {
	Tx   transaction.Transaction
	Sigs []common.Signature
	Tran *data.Transactor
}

TransactionMessage is a message for a transaction

func (*TransactionMessage) ReadFrom

func (b *TransactionMessage) ReadFrom(r io.Reader) (int64, error)

ReadFrom is a deserialization function

func (*TransactionMessage) Type

func (b *TransactionMessage) Type() message.Type

Type returns the type of the message

func (*TransactionMessage) WriteTo

func (b *TransactionMessage) WriteTo(w io.Writer) (int64, error)

WriteTo is a serialization function

Jump to

Keyboard shortcuts

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