Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Category is message category for extensible payloads.
Category = "StateService"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger interface { GetConfig() config.ProtocolConfiguration HeaderHeight() uint32 SubscribeForBlocks(ch chan<- *block.Block) UnsubscribeFromBlocks(ch chan<- *block.Block) }
Ledger is the interface to Blockchain sufficient for Service.
type Message ¶
type Message struct { Type MessageType Payload io.Serializable }
Message represents state-root related message.
func NewMessage ¶
func NewMessage(typ MessageType, p io.Serializable) *Message
NewMessage creates new message of specified type.
func (*Message) DecodeBinary ¶
DecodeBinary implements io.Serializable interface.
func (*Message) EncodeBinary ¶
EncodeBinary implements io.Serializable interface.
type MessageType ¶
type MessageType byte
MessageType represents message type.
const ( VoteT MessageType = 0 RootT MessageType = 1 )
Various message types.
type RelayCallback ¶
type RelayCallback = func(*payload.Extensible)
RelayCallback represents callback for sending validated state roots.
type Service ¶
type Service interface { OnPayload(p *payload.Extensible) error AddSignature(height uint32, validatorIndex int32, sig []byte) error GetConfig() config.StateRoot Start() Shutdown() }
Service represents state root service.
type Vote ¶
Vote represents vote message.
func (*Vote) DecodeBinary ¶
DecodeBinary implements io.Serializable interface.
func (*Vote) EncodeBinary ¶
EncodeBinary implements io.Serializable interface.
Click to show internal directories.
Click to hide internal directories.