Documentation ¶
Index ¶
- Constants
- Variables
- type PredicateResults
- func (p *PredicateResults) Bytes() ([]byte, error)
- func (p *PredicateResults) DeleteTxPredicateResults(txHash common.Hash)
- func (p *PredicateResults) GetPredicateResults(txHash common.Hash, address common.Address) []byte
- func (p *PredicateResults) SetTxPredicateResults(txHash common.Hash, txResults TxPredicateResults)
- func (p *PredicateResults) String() string
- type TxPredicateResults
Constants ¶
const ( Version = uint16(0) MaxResultsSize = units.MiB )
Variables ¶
var Codec codec.Manager
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 ¶
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 ¶
TxPredicateResults is a map of results for each precompile address to the resulting byte array.