-
Notifications
You must be signed in to change notification settings - Fork 177
/
computation_manager.go
90 lines (71 loc) · 2.42 KB
/
computation_manager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mock
import (
context "context"
execution "github.com/onflow/flow-go/engine/execution"
entity "github.com/onflow/flow-go/module/mempool/entity"
flow "github.com/onflow/flow-go/model/flow"
mock "github.com/stretchr/testify/mock"
state "github.com/onflow/flow-go/fvm/state"
)
// ComputationManager is an autogenerated mock type for the ComputationManager type
type ComputationManager struct {
mock.Mock
}
// ComputeBlock provides a mock function with given fields: ctx, block, view
func (_m *ComputationManager) ComputeBlock(ctx context.Context, block *entity.ExecutableBlock, view state.View) (*execution.ComputationResult, error) {
ret := _m.Called(ctx, block, view)
var r0 *execution.ComputationResult
if rf, ok := ret.Get(0).(func(context.Context, *entity.ExecutableBlock, state.View) *execution.ComputationResult); ok {
r0 = rf(ctx, block, view)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*execution.ComputationResult)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *entity.ExecutableBlock, state.View) error); ok {
r1 = rf(ctx, block, view)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExecuteScript provides a mock function with given fields: _a0, _a1, _a2, _a3
func (_m *ComputationManager) ExecuteScript(_a0 []byte, _a1 [][]byte, _a2 *flow.Header, _a3 state.View) ([]byte, error) {
ret := _m.Called(_a0, _a1, _a2, _a3)
var r0 []byte
if rf, ok := ret.Get(0).(func([]byte, [][]byte, *flow.Header, state.View) []byte); ok {
r0 = rf(_a0, _a1, _a2, _a3)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
var r1 error
if rf, ok := ret.Get(1).(func([]byte, [][]byte, *flow.Header, state.View) error); ok {
r1 = rf(_a0, _a1, _a2, _a3)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAccount provides a mock function with given fields: addr, header, view
func (_m *ComputationManager) GetAccount(addr flow.Address, header *flow.Header, view state.View) (*flow.Account, error) {
ret := _m.Called(addr, header, view)
var r0 *flow.Account
if rf, ok := ret.Get(0).(func(flow.Address, *flow.Header, state.View) *flow.Account); ok {
r0 = rf(addr, header, view)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*flow.Account)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(flow.Address, *flow.Header, state.View) error); ok {
r1 = rf(addr, header, view)
} else {
r1 = ret.Error(1)
}
return r0, r1
}