results

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version        = uint16(0)
	MaxResultsSize = units.MiB
)

Variables

Functions

This section is empty.

Types

type PredicateResults

type PredicateResults struct {
	Results map[common.Hash]TxPredicateResults `serialize:"true"`
}

PredicateResults encodes the precompile predicate results included in a block on a per transaction basis. PredicateResults is not thread-safe.

func NewPredicateResults

func NewPredicateResults() *PredicateResults

NewPredicateResults returns an empty predicate results.

func NewPredicateResultsFromMap

func NewPredicateResultsFromMap(results map[common.Hash]TxPredicateResults) *PredicateResults

func ParsePredicateResults

func ParsePredicateResults(b []byte) (*PredicateResults, error)

ParsePredicateResults parses [b] into predicate results.

func (*PredicateResults) Bytes

func (p *PredicateResults) Bytes() ([]byte, error)

Bytes marshals the current state of predicate results

func (*PredicateResults) DeleteTxPredicateResults

func (p *PredicateResults) DeleteTxPredicateResults(txHash common.Hash)

DeleteTxPredicateResults deletes the predicate results for the given [txHash].

func (*PredicateResults) GetPredicateResults

func (p *PredicateResults) GetPredicateResults(txHash common.Hash, address common.Address) []byte

GetPredicateResults returns the byte array results for [txHash] from precompile [address] if available.

func (*PredicateResults) SetTxPredicateResults

func (p *PredicateResults) SetTxPredicateResults(txHash common.Hash, txResults TxPredicateResults)

SetTxPredicateResults sets the predicate results for the given [txHash]. Overrides results if present.

func (*PredicateResults) String

func (p *PredicateResults) String() string

type TxPredicateResults

type TxPredicateResults map[common.Address][]byte

TxPredicateResults is a map of results for each precompile address to the resulting byte array.

Jump to

Keyboard shortcuts

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