-
Notifications
You must be signed in to change notification settings - Fork 175
/
view_committer.go
87 lines (70 loc) · 2.6 KB
/
view_committer.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
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
execution "github.com/onflow/flow-go/engine/execution"
flow "github.com/onflow/flow-go/model/flow"
ledger "github.com/onflow/flow-go/ledger"
mock "github.com/stretchr/testify/mock"
snapshot "github.com/onflow/flow-go/fvm/storage/snapshot"
)
// ViewCommitter is an autogenerated mock type for the ViewCommitter type
type ViewCommitter struct {
mock.Mock
}
// CommitView provides a mock function with given fields: _a0, _a1
func (_m *ViewCommitter) CommitView(_a0 *snapshot.ExecutionSnapshot, _a1 execution.ExtendableStorageSnapshot) (flow.StateCommitment, []byte, *ledger.TrieUpdate, execution.ExtendableStorageSnapshot, error) {
ret := _m.Called(_a0, _a1)
var r0 flow.StateCommitment
var r1 []byte
var r2 *ledger.TrieUpdate
var r3 execution.ExtendableStorageSnapshot
var r4 error
if rf, ok := ret.Get(0).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) (flow.StateCommitment, []byte, *ledger.TrieUpdate, execution.ExtendableStorageSnapshot, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) flow.StateCommitment); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(flow.StateCommitment)
}
}
if rf, ok := ret.Get(1).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) []byte); ok {
r1 = rf(_a0, _a1)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]byte)
}
}
if rf, ok := ret.Get(2).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) *ledger.TrieUpdate); ok {
r2 = rf(_a0, _a1)
} else {
if ret.Get(2) != nil {
r2 = ret.Get(2).(*ledger.TrieUpdate)
}
}
if rf, ok := ret.Get(3).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) execution.ExtendableStorageSnapshot); ok {
r3 = rf(_a0, _a1)
} else {
if ret.Get(3) != nil {
r3 = ret.Get(3).(execution.ExtendableStorageSnapshot)
}
}
if rf, ok := ret.Get(4).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) error); ok {
r4 = rf(_a0, _a1)
} else {
r4 = ret.Error(4)
}
return r0, r1, r2, r3, r4
}
type mockConstructorTestingTNewViewCommitter interface {
mock.TestingT
Cleanup(func())
}
// NewViewCommitter creates a new instance of ViewCommitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewViewCommitter(t mockConstructorTestingTNewViewCommitter) *ViewCommitter {
mock := &ViewCommitter{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}