/
chain_puller.go
59 lines (47 loc) · 1.29 KB
/
chain_puller.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
//<developer>
// <name>linapex 曹一峰</name>
// <email>linapex@163.com</email>
// <wx>superexc</wx>
// <qqgroup>128148617</qqgroup>
// <url>https://jsq.ink</url>
// <role>pku engineer</role>
// <date>2019-03-16 19:40:28</date>
//</624456091647873024>
//Code generated by mockery v1.0.0. 不要编辑。
package mocks
import common "github.com/hyperledger/fabric/protos/common"
import mock "github.com/stretchr/testify/mock"
//chainpuller是为chainpuller类型自动生成的模拟类型
type ChainPuller struct {
mock.Mock
}
//close为给定字段提供模拟函数:
func (_m *ChainPuller) Close() {
_m.Called()
}
//Heightsbyendpoints为给定字段提供模拟函数:
func (_m *ChainPuller) HeightsByEndpoints() map[string]uint64 {
ret := _m.Called()
var r0 map[string]uint64
if rf, ok := ret.Get(0).(func() map[string]uint64); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]uint64)
}
}
return r0
}
//pullblock提供了一个具有给定字段的模拟函数:seq
func (_m *ChainPuller) PullBlock(seq uint64) *common.Block {
ret := _m.Called(seq)
var r0 *common.Block
if rf, ok := ret.Get(0).(func(uint64) *common.Block); ok {
r0 = rf(seq)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*common.Block)
}
}
return r0
}