state

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlockState

func CreateBlockState(id uint64) model.BlockState

func CreateBlockStateFromBytes

func CreateBlockStateFromBytes(data []byte) (model.BlockState, error)

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type BlockState

type BlockState struct {
	// contains filtered or unexported fields
}

func NewBlockState

func NewBlockState(id uint64) *BlockState

func NewBlockStateFromBytes

func NewBlockStateFromBytes(data []byte) (*BlockState, error)

func NewBlockStateFull

func NewBlockStateFull(id uint64, order uint64, weight uint64, status model.BlockStatus, duplicateTxs []int, evmRoot common.Hash, root hash.Hash) *BlockState

func (*BlockState) Bytes

func (b *BlockState) Bytes() ([]byte, error)

func (*BlockState) DecodeRLP

func (b *BlockState) DecodeRLP(dec *rlp.Stream) error

func (*BlockState) EncodeRLP

func (b *BlockState) EncodeRLP(_w io.Writer) error

func (*BlockState) GetDuplicateTxs

func (b *BlockState) GetDuplicateTxs() []int

func (*BlockState) GetEVMHash

func (b *BlockState) GetEVMHash() common.Hash

func (*BlockState) GetEVMNumber

func (b *BlockState) GetEVMNumber() uint64

func (*BlockState) GetEVMRoot

func (b *BlockState) GetEVMRoot() common.Hash

func (*BlockState) GetID

func (b *BlockState) GetID() uint64

func (*BlockState) GetOrder

func (b *BlockState) GetOrder() uint64

func (*BlockState) GetStatus

func (b *BlockState) GetStatus() model.BlockStatus

func (*BlockState) GetWeight

func (b *BlockState) GetWeight() uint64

func (*BlockState) Invalid

func (b *BlockState) Invalid()

func (*BlockState) IsOrdered

func (b *BlockState) IsOrdered() bool

func (*BlockState) Root

func (b *BlockState) Root() *hash.Hash

func (*BlockState) SetDefault

func (b *BlockState) SetDefault(parent model.BlockState)

func (*BlockState) SetEVM

func (b *BlockState) SetEVM(header *etypes.Header)

func (*BlockState) SetOrder

func (b *BlockState) SetOrder(o uint64)

func (*BlockState) SetRoot

func (b *BlockState) SetRoot(root *hash.Hash)

func (*BlockState) SetWeight

func (b *BlockState) SetWeight(weight uint64)

func (*BlockState) Update

func (b *BlockState) Update(block *types.SerializedBlock, prev model.BlockState, header *etypes.Header)

func (*BlockState) Valid

func (b *BlockState) Valid()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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