util

package
v0.0.0-...-f26bfb2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AcceptMessageType string = "ACCEPT"
View Source
var ProposeMessageType string = "PROPOSE"
View Source
var StopDataMessageType string = "STOPDATA"
View Source
var StopMessageType string = "STOP"
View Source
var SyncMessageType string = "SYNC"
View Source
var WriteMessageType string = "WRITE"

Functions

func GarbleValue

func GarbleValue() testlib.Action

func IsAccept

func IsAccept() sm.Condition

func IsDecided

func IsDecided() sm.Condition

func IsDecidedOf

func IsDecidedOf(epoch int) sm.Condition

func IsEpoch

func IsEpoch(epoch int) sm.Condition

func IsMessageFromRandom

func IsMessageFromRandom() sm.Condition

func IsMessageToRandom

func IsMessageToRandom() sm.Condition

func IsMessageType

func IsMessageType(t string) sm.Condition

func IsNewEpoch

func IsNewEpoch() sm.Condition

func IsNewEpochOf

func IsNewEpochOf(epoch int) sm.Condition

func IsPropose

func IsPropose() sm.Condition

func IsView

func IsView(view int) sm.Condition

func IsWrite

func IsWrite() sm.Condition

func PickRandomProcess

func PickRandomProcess() func(*testlib.Context) error

func PrintMessage

func PrintMessage() testlib.Action

Types

type BFTSmartMessage

type BFTSmartMessage struct {
	Sender    int
	Type      int
	Ts        int
	Payload   []byte
	Number    int
	Epoch     int
	PaxosType int
	Value     []byte
	Proof     []byte
}

func GetParsedMessage

func GetParsedMessage(e *types.Event, c *sm.Context) (*BFTSmartMessage, bool)

func (*BFTSmartMessage) Clone

func (m *BFTSmartMessage) Clone() types.ParsedMessage

func (*BFTSmartMessage) Marshal

func (m *BFTSmartMessage) Marshal() ([]byte, error)

func (*BFTSmartMessage) String

func (m *BFTSmartMessage) String() string

func (*BFTSmartMessage) TypeString

func (m *BFTSmartMessage) TypeString() string

type BFTSmartParser

type BFTSmartParser struct {
}

func (*BFTSmartParser) Parse

func (*BFTSmartParser) Parse(data []byte) (types.ParsedMessage, error)

Jump to

Keyboard shortcuts

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