states

package
v1.6.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: LGPL-3.0 Imports: 6 Imported by: 76

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRawStorageItem added in v1.5.1

func GenRawStorageItem(value []byte) []byte

func GetValueFromRawStorageItem added in v1.5.1

func GetValueFromRawStorageItem(raw []byte) ([]byte, error)

Types

type BookkeeperState

type BookkeeperState struct {
	StateBase
	CurrBookkeeper []keypair.PublicKey
	NextBookkeeper []keypair.PublicKey
}

func (*BookkeeperState) Deserialize

func (this *BookkeeperState) Deserialize(r io.Reader) error

func (*BookkeeperState) Serialize

func (this *BookkeeperState) Serialize(w io.Writer) error

func (*BookkeeperState) ToArray

func (v *BookkeeperState) ToArray() []byte

type StateBase

type StateBase struct {
	StateVersion byte
}

func (*StateBase) Deserialize

func (this *StateBase) Deserialize(r io.Reader) error

func (*StateBase) Serialize

func (this *StateBase) Serialize(w io.Writer) error

type StateValue

type StateValue interface {
	Serialize(w io.Writer) error
	Deserialize(r io.Reader) error
}

type StorageItem

type StorageItem struct {
	StateBase
	Value []byte
}

func (*StorageItem) Deserialize

func (this *StorageItem) Deserialize(r io.Reader) error

func (*StorageItem) Serialize

func (this *StorageItem) Serialize(w io.Writer) error

func (*StorageItem) ToArray

func (storageItem *StorageItem) ToArray() []byte

type StorageKey

type StorageKey struct {
	ContractAddress common.Address
	Key             []byte
}

func (*StorageKey) Deserialize

func (this *StorageKey) Deserialize(r io.Reader) error

func (*StorageKey) Serialize

func (this *StorageKey) Serialize(w io.Writer) (int, error)

func (*StorageKey) ToArray

func (this *StorageKey) ToArray() []byte

type ValidatorState

type ValidatorState struct {
	StateBase
	PublicKey keypair.PublicKey
}

func (*ValidatorState) Deserialize

func (this *ValidatorState) Deserialize(r io.Reader) error

func (*ValidatorState) Serialize

func (this *ValidatorState) Serialize(w io.Writer) error

type VoteState

type VoteState struct {
	StateBase
	PublicKeys []keypair.PublicKey
	Count      common.Fixed64
}

func (*VoteState) Deserialize

func (this *VoteState) Deserialize(r io.Reader) error

func (*VoteState) Serialize

func (this *VoteState) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

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