programs

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractUpdate

type ContractUpdate struct {
	ContractUpdateKey
	Code []byte
}

type ContractUpdateKey

type ContractUpdateKey struct {
	Address flow.Address
	Name    string
}

type ProgramEntry

type ProgramEntry struct {
	Location common.Location
	Program  *interpreter.Program
	State    *state.State
}

type Programs

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

Programs is a cumulative cache-like storage for Programs helping speed up execution of Cadence Programs don't evict elements at will, like a typical cache would, but it does it only during a cleanup method, which must be called only when the Cadence execution has finished. It it also fork-aware, support cheap creation of children capturing local changes.

func NewEmptyPrograms

func NewEmptyPrograms() *Programs

func (*Programs) ChildPrograms

func (p *Programs) ChildPrograms() *Programs

func (*Programs) Cleanup

func (p *Programs) Cleanup(changedContracts []ContractUpdateKey)

func (*Programs) ForceCleanup

func (p *Programs) ForceCleanup()

ForceCleanup is used to force a complete cleanup It exists temporarily to facilitate a temporary measure which can retry a transaction in case checking fails It should be gone when the extra retry is gone

func (*Programs) Get

func (p *Programs) Get(location common.Location) (*interpreter.Program, *state.State, bool)

Get returns stored program, state which contains changes which correspond to loading this program, and boolean indicating if the value was found

func (*Programs) HasChanges

func (p *Programs) HasChanges() bool

HasChanges indicates if any changes has been introduced essentially telling if this object is identical to its parent

func (*Programs) Set

func (p *Programs) Set(location common.Location, program *interpreter.Program, state *state.State)

Jump to

Keyboard shortcuts

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