Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar
Commits
1f04d73d
Commit
1f04d73d
authored
Nov 08, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ipfs information and Fixed bug
parent
2d6398d3
Pipeline
#8225
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
6 deletions
+57
-6
config.go
hub/client/config.go
+0
-1
launcher.go
internal/launcher.go
+4
-4
syncer.go
internal/syncer/syncer.go
+2
-1
mock_client.go
pkg/plugins/mock_client/mock_client.go
+51
-0
No files found.
hub/client/config.go
View file @
1f04d73d
...
@@ -19,7 +19,6 @@ type config struct {
...
@@ -19,7 +19,6 @@ type config struct {
logger
Logger
logger
Logger
privateKey
crypto
.
PrivateKey
privateKey
crypto
.
PrivateKey
nodesInfo
[]
*
NodeInfo
nodesInfo
[]
*
NodeInfo
ipfsAddrs
[]
string
timeoutLimit
time
.
Duration
// timeout limit config for dialing grpc
timeoutLimit
time
.
Duration
// timeout limit config for dialing grpc
}
}
...
...
internal/launcher.go
View file @
1f04d73d
package
internal
package
internal
//
type Launcher interface {
type
Launcher
interface
{
//
Start() error
Start
()
error
//
Stop() error
Stop
()
error
//
}
}
internal/syncer/syncer.go
View file @
1f04d73d
...
@@ -293,7 +293,7 @@ func (syncer *WrapperSyncer) handleInterchainWrapperAndPersist(ws *pb.Interchain
...
@@ -293,7 +293,7 @@ func (syncer *WrapperSyncer) handleInterchainWrapperAndPersist(ws *pb.Interchain
}
}
// handleInterchainTxWrapper is the handler for interchain tx wrapper
// handleInterchainTxWrapper is the handler for interchain tx wrapper
func
(
syncer
*
WrapperSyncer
)
handleInterchainTxWrapper
(
w
*
pb
.
InterchainTxWrapper
,
i
int
,
icm
map
[
string
]
*
rpcx
.
Interchain
)
bool
{
func
(
syncer
*
WrapperSyncer
)
handleInterchainTxWrapper
(
w
*
pb
.
InterchainTxWrapper
,
i
int
,
_
map
[
string
]
*
rpcx
.
Interchain
)
bool
{
if
w
==
nil
{
if
w
==
nil
{
syncer
.
logger
.
WithField
(
"height"
,
syncer
.
height
)
.
Error
(
"empty interchain tx wrapper"
)
syncer
.
logger
.
WithField
(
"height"
,
syncer
.
height
)
.
Error
(
"empty interchain tx wrapper"
)
return
false
return
false
...
@@ -377,6 +377,7 @@ func (syncer *WrapperSyncer) verifyWrapper(w *pb.InterchainTxWrapper) (bool, err
...
@@ -377,6 +377,7 @@ func (syncer *WrapperSyncer) verifyWrapper(w *pb.InterchainTxWrapper) (bool, err
var
header
*
pb
.
BlockHeader
var
header
*
pb
.
BlockHeader
if
err
:=
retry
.
Retry
(
func
(
attempt
uint
)
error
{
if
err
:=
retry
.
Retry
(
func
(
attempt
uint
)
error
{
// TODO
header
,
err
=
syncer
.
lite
.
QueryHeader
(
w
.
Height
)
header
,
err
=
syncer
.
lite
.
QueryHeader
(
w
.
Height
)
if
err
!=
nil
{
if
err
!=
nil
{
syncer
.
logger
.
Warnf
(
"query header: %s"
,
err
.
Error
())
syncer
.
logger
.
Warnf
(
"query header: %s"
,
err
.
Error
())
...
...
pkg/plugins/mock_client/mock_client.go
View file @
1f04d73d
...
@@ -61,6 +61,57 @@ func (mr *MockKernelMockRecorder) Kill() *gomock.Call {
...
@@ -61,6 +61,57 @@ func (mr *MockKernelMockRecorder) Kill() *gomock.Call {
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"Kill"
,
reflect
.
TypeOf
((
*
MockKernel
)(
nil
)
.
Kill
))
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"Kill"
,
reflect
.
TypeOf
((
*
MockKernel
)(
nil
)
.
Kill
))
}
}
// MockLauncher is a mock of Launcher interface.
type
MockLauncher
struct
{
ctrl
*
gomock
.
Controller
recorder
*
MockLauncherMockRecorder
}
// MockLauncherMockRecorder is the mock recorder for MockLauncher.
type
MockLauncherMockRecorder
struct
{
mock
*
MockLauncher
}
// NewMockLauncher creates a new mock instance.
func
NewMockLauncher
(
ctrl
*
gomock
.
Controller
)
*
MockLauncher
{
mock
:=
&
MockLauncher
{
ctrl
:
ctrl
}
mock
.
recorder
=
&
MockLauncherMockRecorder
{
mock
}
return
mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func
(
m
*
MockLauncher
)
EXPECT
()
*
MockLauncherMockRecorder
{
return
m
.
recorder
}
// Start mocks base method.
func
(
m
*
MockLauncher
)
Start
()
error
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"Start"
)
ret0
,
_
:=
ret
[
0
]
.
(
error
)
return
ret0
}
// Start indicates an expected call of Start.
func
(
mr
*
MockLauncherMockRecorder
)
Start
()
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"Start"
,
reflect
.
TypeOf
((
*
MockLauncher
)(
nil
)
.
Start
))
}
// Stop mocks base method.
func
(
m
*
MockLauncher
)
Stop
()
error
{
m
.
ctrl
.
T
.
Helper
()
ret
:=
m
.
ctrl
.
Call
(
m
,
"Stop"
)
ret0
,
_
:=
ret
[
0
]
.
(
error
)
return
ret0
}
// Stop indicates an expected call of Stop.
func
(
mr
*
MockLauncherMockRecorder
)
Stop
()
*
gomock
.
Call
{
mr
.
mock
.
ctrl
.
T
.
Helper
()
return
mr
.
mock
.
ctrl
.
RecordCallWithMethodType
(
mr
.
mock
,
"Stop"
,
reflect
.
TypeOf
((
*
MockLauncher
)(
nil
)
.
Stop
))
}
// MockClient is a mock of Client interface.
// MockClient is a mock of Client interface.
type
MockClient
struct
{
type
MockClient
struct
{
ctrl
*
gomock
.
Controller
ctrl
*
gomock
.
Controller
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment