cache

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeResultCache

func MergeResultCache(result *ResultCache, to *ResultCache)

Types

type AccountCache

type AccountCache map[types.Address]*environment.Account

func (AccountCache) Clone

func (c AccountCache) Clone() AccountCache

func (AccountCache) Get

func (c AccountCache) Get(address types.Address) *environment.Account

func (AccountCache) GetSlot

func (c AccountCache) GetSlot(address types.Address, slot types.Slot) *evmInt256.Int

func (AccountCache) Merge

func (c AccountCache) Merge(cache AccountCache)

func (AccountCache) Set

func (c AccountCache) Set(acc *environment.Account)

func (AccountCache) SetSlot

func (c AccountCache) SetSlot(address types.Address, slot types.Slot, value *evmInt256.Int)

type DestructCache

type DestructCache map[types.Address]types.Address

func (DestructCache) Clone

func (d DestructCache) Clone() DestructCache

func (DestructCache) Merge

func (d DestructCache) Merge(cache DestructCache)

type LogCache

type LogCache []*types.Log

func (LogCache) Clone

func (l LogCache) Clone() LogCache

type ReadOnlyCache

type ReadOnlyCache struct {
	BlockHash map[types.Slot]*evmInt256.Int
}

type ResultCache

type ResultCache struct {
	OriginalAccounts AccountCache
	CachedAccounts   AccountCache

	NewContractAccounts AccountCache

	Logs      *LogCache
	Destructs DestructCache
	// contains filtered or unexported fields
}

func NewResultCache

func NewResultCache() ResultCache

func (*ResultCache) CacheAccount added in v0.5.0

func (r *ResultCache) CacheAccount(acc *environment.Account) *environment.Account

func (*ResultCache) Clone

func (r *ResultCache) Clone() ResultCache

func (*ResultCache) RemoveAccount added in v0.5.0

func (r *ResultCache) RemoveAccount(addr types.Address)

func (*ResultCache) XCachedLoad

func (r *ResultCache) XCachedLoad(address types.Address, slot types.Slot, t TypeOfStorage) *evmInt256.Int

func (*ResultCache) XCachedStore

func (r *ResultCache) XCachedStore(address types.Address, slot types.Slot, val *evmInt256.Int, t TypeOfStorage)

func (*ResultCache) XOriginalStore

func (r *ResultCache) XOriginalStore(address types.Address, slot types.Slot, val *evmInt256.Int, t TypeOfStorage)

type TransientCache

type TransientCache map[types.Address]transientSlot

func (TransientCache) Clone

func (c TransientCache) Clone() TransientCache

func (TransientCache) Get

func (c TransientCache) Get(address types.Address, slot types.Slot) *evmInt256.Int

func (TransientCache) Merge

func (c TransientCache) Merge(cache TransientCache)

func (TransientCache) Set

func (c TransientCache) Set(address types.Address, slot types.Slot, v *evmInt256.Int)

type TypeOfStorage

type TypeOfStorage int
const (
	SStorage TypeOfStorage = 1
	TStorage TypeOfStorage = 2
)

Jump to

Keyboard shortcuts

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