types

package
v1.11.6-statediff-5.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitOrRollback

func CommitOrRollback(tx Tx, err error) error

func IsNullHash

func IsNullHash(hash common.Hash) bool

Types

type NodeType

type NodeType int

NodeType for explicitly setting type of node

const (
	Branch NodeType = iota
	Extension
	Leaf
	Removed
	Unknown
)

func CheckKeyType

func CheckKeyType(elements []interface{}) (NodeType, error)

CheckKeyType checks what type of key we have

type Publisher

type Publisher interface {
	PublishHeader(header *types.Header) error
	PublishStateLeafNode(node *models.StateNodeModel, tx Tx) error
	PublishStorageLeafNode(node *models.StorageNodeModel, tx Tx) error
	PublishIPLD(c cid.Cid, raw []byte, height *big.Int, tx Tx) error
	BeginTx() (Tx, error)
	PrepareTxForBatch(tx Tx, batchSize uint) (Tx, error)
}

type Tx

type Tx interface {
	Rollback() error
	Commit() error
}

Jump to

Keyboard shortcuts

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