forked from coinbase/mesh-sdk-go
/
broadcast_storage_helper.go
116 lines (94 loc) · 3.13 KB
/
broadcast_storage_helper.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Code generated by mockery v1.0.0. DO NOT EDIT.
package modules
import (
context "context"
mock "github.com/stretchr/testify/mock"
database "github.com/guapcrypto/rosetta-sdk-go/storage/database"
types "github.com/guapcrypto/rosetta-sdk-go/types"
)
// BroadcastStorageHelper is an autogenerated mock type for the BroadcastStorageHelper type
type BroadcastStorageHelper struct {
mock.Mock
}
// AtTip provides a mock function with given fields: _a0, _a1
func (_m *BroadcastStorageHelper) AtTip(_a0 context.Context, _a1 int64) (bool, error) {
ret := _m.Called(_a0, _a1)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int64) bool); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// BroadcastTransaction provides a mock function with given fields: _a0, _a1, _a2
func (_m *BroadcastStorageHelper) BroadcastTransaction(_a0 context.Context, _a1 *types.NetworkIdentifier, _a2 string) (*types.TransactionIdentifier, error) {
ret := _m.Called(_a0, _a1, _a2)
var r0 *types.TransactionIdentifier
if rf, ok := ret.Get(0).(func(context.Context, *types.NetworkIdentifier, string) *types.TransactionIdentifier); ok {
r0 = rf(_a0, _a1, _a2)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.TransactionIdentifier)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.NetworkIdentifier, string) error); ok {
r1 = rf(_a0, _a1, _a2)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CurrentBlockIdentifier provides a mock function with given fields: _a0
func (_m *BroadcastStorageHelper) CurrentBlockIdentifier(_a0 context.Context) (*types.BlockIdentifier, error) {
ret := _m.Called(_a0)
var r0 *types.BlockIdentifier
if rf, ok := ret.Get(0).(func(context.Context) *types.BlockIdentifier); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.BlockIdentifier)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindTransaction provides a mock function with given fields: _a0, _a1, _a2
func (_m *BroadcastStorageHelper) FindTransaction(_a0 context.Context, _a1 *types.TransactionIdentifier, _a2 database.Transaction) (*types.BlockIdentifier, *types.Transaction, error) {
ret := _m.Called(_a0, _a1, _a2)
var r0 *types.BlockIdentifier
if rf, ok := ret.Get(0).(func(context.Context, *types.TransactionIdentifier, database.Transaction) *types.BlockIdentifier); ok {
r0 = rf(_a0, _a1, _a2)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.BlockIdentifier)
}
}
var r1 *types.Transaction
if rf, ok := ret.Get(1).(func(context.Context, *types.TransactionIdentifier, database.Transaction) *types.Transaction); ok {
r1 = rf(_a0, _a1, _a2)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*types.Transaction)
}
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, *types.TransactionIdentifier, database.Transaction) error); ok {
r2 = rf(_a0, _a1, _a2)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}