Documentation ¶
Index ¶
- Constants
- type ComputationManager
- type Manager
- func (e *Manager) ComputeBlock(ctx context.Context, block *entity.ExecutableBlock, view state.View) (*execution.ComputationResult, error)
- func (e *Manager) ExecuteScript(code []byte, arguments [][]byte, blockHeader *flow.Header, view state.View) ([]byte, error)
- func (e *Manager) GetAccount(address flow.Address, blockHeader *flow.Header, view state.View) (*flow.Account, error)
- type ProgramsCache
- type VirtualMachine
Constants ¶
View Source
const DefaultProgramsCacheSize = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputationManager ¶
type ComputationManager interface { ExecuteScript([]byte, [][]byte, *flow.Header, state.View) ([]byte, error) ComputeBlock( ctx context.Context, block *entity.ExecutableBlock, view state.View, ) (*execution.ComputationResult, error) GetAccount(addr flow.Address, header *flow.Header, view state.View) (*flow.Account, error) }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages computation and execution
func (*Manager) ComputeBlock ¶
func (e *Manager) ComputeBlock( ctx context.Context, block *entity.ExecutableBlock, view state.View, ) (*execution.ComputationResult, error)
func (*Manager) ExecuteScript ¶
type ProgramsCache ¶ added in v0.14.6
type ProgramsCache struct {
// contains filtered or unexported fields
}
func NewProgramsCache ¶ added in v0.14.6
func NewProgramsCache(size uint) (*ProgramsCache, error)
func (*ProgramsCache) Get ¶ added in v0.14.6
func (pc *ProgramsCache) Get(blockID flow.Identifier) *programs.Programs
func (*ProgramsCache) Set ¶ added in v0.14.6
func (pc *ProgramsCache) Set(blockId flow.Identifier, programs *programs.Programs)
Click to show internal directories.
Click to hide internal directories.