evidence migration with fixes to generated mocks

This commit is contained in:
Marko Baricevic
2021-02-03 17:05:42 +01:00
parent e77796550a
commit a854e7f545
34 changed files with 248 additions and 246 deletions
+1
View File
@@ -26,6 +26,7 @@ var errNegOrZeroHeight = errors.New("negative or zero height")
type KeyPathFunc func(path string, key []byte) (merkle.KeyPath, error)
// LightClient is an interface that contains functionality needed by Client from the light client.
//go:generate mockery --case underscore --name LightClient
type LightClient interface {
ChainID() string
VerifyLightBlockAtHeight(ctx context.Context, height uint64, now time.Time) (*types.LightBlock, error)
+6 -6
View File
@@ -1,4 +1,4 @@
// Code generated by mockery v2.3.0. DO NOT EDIT.
// Code generated by mockery v2.5.1. DO NOT EDIT.
package mocks
@@ -36,7 +36,7 @@ func (_m *LightClient) TrustedLightBlock(height uint64) (*types.LightBlock, erro
ret := _m.Called(height)
var r0 *types.LightBlock
if rf, ok := ret.Get(0).(func(int64) *types.LightBlock); ok {
if rf, ok := ret.Get(0).(func(uint64) *types.LightBlock); ok {
r0 = rf(height)
} else {
if ret.Get(0) != nil {
@@ -45,7 +45,7 @@ func (_m *LightClient) TrustedLightBlock(height uint64) (*types.LightBlock, erro
}
var r1 error
if rf, ok := ret.Get(1).(func(int64) error); ok {
if rf, ok := ret.Get(1).(func(uint64) error); ok {
r1 = rf(height)
} else {
r1 = ret.Error(1)
@@ -55,11 +55,11 @@ func (_m *LightClient) TrustedLightBlock(height uint64) (*types.LightBlock, erro
}
// VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now
func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) {
func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height uint64, now time.Time) (*types.LightBlock, error) {
ret := _m.Called(ctx, height, now)
var r0 *types.LightBlock
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) *types.LightBlock); ok {
if rf, ok := ret.Get(0).(func(context.Context, uint64, time.Time) *types.LightBlock); ok {
r0 = rf(ctx, height, now)
} else {
if ret.Get(0) != nil {
@@ -68,7 +68,7 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, uint64, time.Time) error); ok {
r1 = rf(ctx, height, now)
} else {
r1 = ret.Error(1)