Documentation ¶
Index ¶
- type ContractUpdate
- type ContractUpdateKey
- type ProgramEntry
- type ProgramGetFunc
- type Programs
- func (p *Programs) ChildPrograms() *Programs
- func (p *Programs) Cleanup(changedContracts []ContractUpdateKey)
- func (p *Programs) ForceCleanup()
- func (p *Programs) Get(location common.Location) (*interpreter.Program, *state.State, bool)
- func (p *Programs) HasChanges() bool
- func (p *Programs) Set(location common.Location, program *interpreter.Program, state *state.State)
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 ProgramEntry ¶
type ProgramGetFunc ¶
type ProgramGetFunc func(location common.Location) (*ProgramEntry, bool)
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 (*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 ¶
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 ¶
HasChanges indicates if any changes has been introduced essentially telling if this object is identical to its parent