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
3098180c
Commit
3098180c
authored
Sep 16, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add make goimports
parent
23e599af
Pipeline
#8006
failed with stages
Changes
58
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
326 additions
and
80 deletions
+326
-80
Makefile
Makefile
+5
-0
server.go
api/server.go
+3
-3
appchain_bxh.go
cmd/sidecar/appchain_bxh.go
+4
-3
appchain.go
cmd/sidecar/client/appchain.go
+2
-1
http.go
cmd/sidecar/client/http.go
+2
-1
governance.go
cmd/sidecar/governance.go
+2
-1
id.go
cmd/sidecar/id.go
+2
-1
init.go
cmd/sidecar/init.go
+2
-1
interchain.go
cmd/sidecar/interchain.go
+3
-2
p2p.go
cmd/sidecar/p2p.go
+2
-1
rule.go
cmd/sidecar/rule.go
+3
-2
start.go
cmd/sidecar/start.go
+3
-2
tool.go
cmd/sidecar/tool.go
+2
-2
version.go
cmd/sidecar/version.go
+2
-1
client.go
hub/client/client.go
+2
-1
mock_client.go
hub/client/mock_client/mock_client.go
+3
-2
appchain.go
internal/appchain/appchain.go
+2
-1
mock_executor.go
internal/appchain/mock_executor/mock_executor.go
+1
-0
mock_monitor.go
internal/appchain/mock_monitor/mock_monitor.go
+1
-0
checker_test.go
internal/checker/checker_test.go
+2
-1
loggers.go
internal/loggers/loggers.go
+2
-1
manager.go
internal/manger/manager.go
+3
-2
mock_peermgr.go
internal/peermgr/mock_peermgr/mock_peermgr.go
+1
-0
peermgr.go
internal/peermgr/peermgr.go
+1
-0
peermgr_test.go
internal/peermgr/peermgr_test.go
+5
-4
swarm.go
internal/peermgr/swarm.go
+4
-3
mock_router.go
internal/router/mock_router/mock_router.go
+1
-0
router.go
internal/router/router.go
+2
-1
agent.go
internal/syncer/agent.go
+3
-3
config.go
internal/syncer/config.go
+3
-2
interface.go
internal/syncer/interface.go
+2
-2
mock_syncer.go
internal/syncer/mock_syncer/mock_syncer.go
+2
-1
syncer.go
internal/syncer/syncer.go
+3
-2
syncer_test.go
internal/syncer/syncer_test.go
+6
-5
direct_cryptor.go
internal/txcrypto/direct_cryptor.go
+1
-2
relay_cryptor.go
internal/txcrypto/relay_cryptor.go
+3
-2
txcrypto_test.go
internal/txcrypto/txcrypto_test.go
+4
-3
arg.pb.go
model/pb/arg.pb.go
+3
-0
basic.pb.go
model/pb/basic.pb.go
+21
-0
block.pb.go
model/pb/block.pb.go
+6
-0
broker.pb.go
model/pb/broker.pb.go
+69
-0
bxh_transaction.pb.go
model/pb/bxh_transaction.pb.go
+24
-0
chain.pb.go
model/pb/chain.pb.go
+3
-0
commit.pb.go
model/pb/commit.pb.go
+3
-0
ibtp.pb.go
model/pb/ibtp.pb.go
+12
-0
ibtpx.pb.go
model/pb/ibtpx.pb.go
+3
-0
interchain_meta.pb.go
model/pb/interchain_meta.pb.go
+6
-0
message.pb.go
model/pb/message.pb.go
+9
-0
plugin.pb.go
model/pb/plugin.pb.go
+33
-0
receipt.pb.go
model/pb/receipt.pb.go
+12
-0
transaction.go
model/pb/transaction.go
+2
-0
vp_info.pb.go
model/pb/vp_info.pb.go
+3
-0
grpc.go
pkg/plugins/grpc.go
+1
-0
interface.go
pkg/plugins/interface.go
+0
-1
mock_client.go
pkg/plugins/mock_client/mock_client.go
+1
-0
plugin.go
pkg/plugins/plugin.go
+3
-2
start.go
pkg/plugins/start.go
+1
-0
plugin_test.go
pkg/plugins/test/plugin_test.go
+17
-18
No files found.
Makefile
View file @
3098180c
...
...
@@ -161,6 +161,8 @@ build-dep:
@
go
install
mvdan.cc/sh/v3/cmd/shfmt@latest
@
go
install
mvdan.cc/sh/v3/cmd/gosh@latest
@
go
install
mvdan.cc/unparam@latest
@
go
install
github.com/incu6us/goimports-reviser@master
# @apt install clang-format or brew isntall clang-format
# @apt install shellcheck or brew install shellcheck
...
...
@@ -168,6 +170,9 @@ build-dep:
aligner
:
@
aligner
-r
-c
"//"
-e
".go"
-i
./internal/repo/a_repo-packr.go comment
goimports
:
@
goimports-reviser
-dir-path
./
-project-name
github.com/link33/sidecar
-format
-rm-unused
aligner-check
:
@
aligner
-r
-c
"//"
-e
".go"
-i
./internal/repo/a_repo-packr.go check
...
...
api/server.go
View file @
3098180c
...
...
@@ -7,15 +7,15 @@ import (
"net/http"
"path/filepath"
"github.com/gin-gonic/gin"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/sirupsen/logrus"
"github.com/gin-gonic/gin"
"github.com/link33/sidecar/cmd/sidecar/client"
"github.com/link33/sidecar/internal/peermgr"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/sirupsen/logrus"
)
type
Server
struct
{
...
...
cmd/sidecar/appchain_bxh.go
View file @
3098180c
...
...
@@ -7,14 +7,15 @@ import (
"io/ioutil"
"path/filepath"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/meshplus/bitxhub-kit/hexutil"
"github.com/tidwall/gjson"
"github.com/urfave/cli"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant"
)
var
appchainBxhCMD
=
cli
.
Command
{
...
...
cmd/sidecar/client/appchain.go
View file @
3098180c
...
...
@@ -6,11 +6,12 @@ import (
"io/ioutil"
"strconv"
"github.com/link33/sidecar/internal/repo"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo"
)
type
Approve
struct
{
...
...
cmd/sidecar/client/http.go
View file @
3098180c
...
...
@@ -7,8 +7,9 @@ import (
"net/http"
"strings"
"github.com/link33/sidecar/internal/repo"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo"
)
const
(
...
...
cmd/sidecar/governance.go
View file @
3098180c
...
...
@@ -3,9 +3,10 @@ package main
import
(
"fmt"
"github.com/urfave/cli"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
"github.com/urfave/cli"
)
var
governanceCMD
=
cli
.
Command
{
...
...
cmd/sidecar/id.go
View file @
3098180c
...
...
@@ -4,9 +4,10 @@ import (
"fmt"
"path/filepath"
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo"
)
var
idCMD
=
cli
.
Command
{
...
...
cmd/sidecar/init.go
View file @
3098180c
...
...
@@ -6,9 +6,10 @@ import (
"os"
"path/filepath"
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/fileutil"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo"
)
var
initCMD
=
cli
.
Command
{
...
...
cmd/sidecar/interchain.go
View file @
3098180c
...
...
@@ -3,11 +3,12 @@ package main
import
(
"fmt"
"github.com/meshplus/bitxhub-kit/types"
"github.com/urfave/cli"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant"
"github.com/meshplus/bitxhub-kit/types"
"github.com/urfave/cli"
)
var
interchainCMD
=
cli
.
Command
{
...
...
cmd/sidecar/p2p.go
View file @
3098180c
...
...
@@ -5,9 +5,10 @@ import (
crypto2
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo"
)
var
p2pCMD
=
cli
.
Command
{
...
...
cmd/sidecar/rule.go
View file @
3098180c
...
...
@@ -5,10 +5,11 @@ import (
"io/ioutil"
"github.com/fatih/color"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
"github.com/tidwall/gjson"
"github.com/urfave/cli"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
)
var
ruleCMD
=
cli
.
Command
{
...
...
cmd/sidecar/start.go
View file @
3098180c
...
...
@@ -11,12 +11,13 @@ import (
"syscall"
"time"
"github.com/meshplus/bitxhub-kit/log"
"github.com/urfave/cli"
"github.com/link33/sidecar/internal"
"github.com/link33/sidecar/internal/app"
"github.com/link33/sidecar/internal/loggers"
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/log"
"github.com/urfave/cli"
)
var
startCMD
=
cli
.
Command
{
...
...
cmd/sidecar/tool.go
View file @
3098180c
...
...
@@ -8,11 +8,11 @@ import (
crypto2
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/link33/sidecar/tool"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli"
"github.com/link33/sidecar/tool"
)
var
toolCMD
=
cli
.
Command
{
...
...
cmd/sidecar/version.go
View file @
3098180c
...
...
@@ -3,8 +3,9 @@ package main
import
(
"fmt"
"github.com/link33/sidecar"
"github.com/urfave/cli"
"github.com/link33/sidecar"
)
var
versionCMD
=
cli
.
Command
{
...
...
hub/client/client.go
View file @
3098180c
...
...
@@ -3,9 +3,10 @@ package rpcx
import
(
"context"
"github.com/link33/sidecar/model/pb"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/types"
"github.com/link33/sidecar/model/pb"
)
type
SubscriptionType
int
...
...
hub/client/mock_client/mock_client.go
View file @
3098180c
...
...
@@ -9,10 +9,11 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
rpcx
"github.com/link33/sidecar/hub/client"
pb
"github.com/link33/sidecar/model/pb"
crypto
"github.com/meshplus/bitxhub-kit/crypto"
types
"github.com/meshplus/bitxhub-kit/types"
rpcx
"github.com/link33/sidecar/hub/client"
pb
"github.com/link33/sidecar/model/pb"
)
// MockClient is a mock of Client interface.
...
...
internal/appchain/appchain.go
View file @
3098180c
...
...
@@ -9,11 +9,12 @@ import (
"github.com/Rican7/retry"
"github.com/Rican7/retry/strategy"
"github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/txcrypto"
"github.com/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/plugins"
"github.com/sirupsen/logrus"
)
type
AppChain
interface
{
...
...
internal/appchain/mock_executor/mock_executor.go
View file @
3098180c
...
...
@@ -8,6 +8,7 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
pb
"github.com/link33/sidecar/model/pb"
)
...
...
internal/appchain/mock_monitor/mock_monitor.go
View file @
3098180c
...
...
@@ -8,6 +8,7 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
pb
"github.com/link33/sidecar/model/pb"
)
...
...
internal/checker/checker_test.go
View file @
3098180c
...
...
@@ -6,9 +6,10 @@ import (
"testing"
"time"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/stretchr/testify/require"
"github.com/link33/sidecar/model/pb"
)
const
(
...
...
internal/loggers/loggers.go
View file @
3098180c
package
loggers
import
(
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/log"
"github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/repo"
)
const
(
...
...
internal/manger/manager.go
View file @
3098180c
...
...
@@ -3,11 +3,12 @@ package manger
import
(
"encoding/json"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/peermgr"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/sirupsen/logrus"
)
type
Manager
struct
{
...
...
internal/peermgr/mock_peermgr/mock_peermgr.go
View file @
3098180c
...
...
@@ -9,6 +9,7 @@ import (
gomock
"github.com/golang/mock/gomock"
peer
"github.com/libp2p/go-libp2p-core/peer"
peermgr
"github.com/link33/sidecar/internal/peermgr"
port
"github.com/link33/sidecar/internal/port"
pb
"github.com/link33/sidecar/model/pb"
...
...
internal/peermgr/peermgr.go
View file @
3098180c
...
...
@@ -2,6 +2,7 @@ package peermgr
import
(
"github.com/libp2p/go-libp2p-core/peer"
"github.com/link33/sidecar/internal"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb"
...
...
internal/peermgr/peermgr_test.go
View file @
3098180c
...
...
@@ -7,16 +7,17 @@ import (
libp2pcry
"github.com/libp2p/go-libp2p-core/crypto"
peer2
"github.com/libp2p/go-libp2p-core/peer"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo"
router2
"github.com/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/meshplus/bitxhub-kit/log"
network
"github.com/meshplus/go-lightp2p"
ma
"github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/require"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo"
router2
"github.com/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb"
)
var
routerTmp
router2
.
Router
...
...
internal/peermgr/swarm.go
View file @
3098180c
...
...
@@ -10,13 +10,14 @@ import (
"github.com/Rican7/retry/strategy"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/meshplus/bitxhub-kit/crypto"
network
"github.com/meshplus/go-lightp2p"
"github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb"
"github.com/meshplus/bitxhub-kit/crypto"
network
"github.com/meshplus/go-lightp2p"
"github.com/sirupsen/logrus"
)
const
(
...
...
internal/router/mock_router/mock_router.go
View file @
3098180c
...
...
@@ -8,6 +8,7 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
port
"github.com/link33/sidecar/internal/port"
pb
"github.com/link33/sidecar/model/pb"
)
...
...
internal/router/router.go
View file @
3098180c
...
...
@@ -5,11 +5,12 @@ import (
"errors"
"strings"
"github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/checker"
"github.com/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb"
"github.com/sirupsen/logrus"
)
type
router
struct
{
...
...
internal/syncer/agent.go
View file @
3098180c
...
...
@@ -6,12 +6,12 @@ import (
"github.com/Rican7/retry"
"github.com/Rican7/retry/strategy"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/types"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/types"
)
const
(
...
...
internal/syncer/config.go
View file @
3098180c
package
syncer
import
(
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo"
"github.com/meshplus/bitxhub-kit/storage"
"github.com/sirupsen/logrus"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo"
)
type
Config
struct
{
...
...
internal/syncer/interface.go
View file @
3098180c
package
syncer
import
(
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
)
type
IBTPHandler
func
(
ibtp
*
pb
.
IBTP
)
...
...
internal/syncer/mock_syncer/mock_syncer.go
View file @
3098180c
...
...
@@ -8,9 +8,10 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
appchain_mgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
syncer
"github.com/link33/sidecar/internal/syncer"
pb
"github.com/link33/sidecar/model/pb"
appchain_mgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
)
// MockSyncer is a mock of Syncer interface.
...
...
internal/syncer/syncer.go
View file @
3098180c
...
...
@@ -11,11 +11,12 @@ import (
"github.com/Rican7/retry"
"github.com/Rican7/retry/strategy"
"github.com/cbergoon/merkletree"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/pb"
"github.com/meshplus/bitxhub-kit/storage"
"github.com/meshplus/bitxhub-kit/types"
"github.com/sirupsen/logrus"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/pb"
)
var
_
Syncer
=
(
*
WrapperSyncer
)(
nil
)
...
...
internal/syncer/syncer_test.go
View file @
3098180c
...
...
@@ -14,11 +14,6 @@ import (
"github.com/cbergoon/merkletree"
"github.com/golang/mock/gomock"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant"
"github.com/link33/sidecar/model/pb"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-core/governance"
"github.com/meshplus/bitxhub-kit/crypto"
...
...
@@ -27,6 +22,12 @@ import (
"github.com/meshplus/bitxhub-kit/storage/leveldb"
"github.com/meshplus/bitxhub-kit/types"
"github.com/stretchr/testify/require"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant"
"github.com/link33/sidecar/model/pb"
)
const
(
...
...
internal/txcrypto/direct_cryptor.go
View file @
3098180c
...
...
@@ -3,9 +3,8 @@ package txcrypto
import
(
"fmt"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/btcsuite/btcd/btcec"
appchainmgr
"github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/ecdh"
"github.com/meshplus/bitxhub-kit/crypto/sym"
...
...
internal/txcrypto/relay_cryptor.go
View file @
3098180c
package
txcrypto
import
(
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/asym/ecdsa"
"github.com/meshplus/bitxhub-kit/crypto/ecdh"
"github.com/meshplus/bitxhub-kit/crypto/sym"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant"
)
type
RelayCryptor
struct
{
...
...
internal/txcrypto/txcrypto_test.go
View file @
3098180c
...
...
@@ -5,13 +5,14 @@ import (
"testing"
"github.com/golang/mock/gomock"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/model/pb"
"github.com/meshplus/bitxhub-core/appchain-mgr/mock_appchainMgr"
"github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/stretchr/testify/require"
rpcx
"github.com/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/model/pb"
)
func
TestRelayCryptor
(
t
*
testing
.
T
)
{
...
...
model/pb/arg.pb.go
View file @
3098180c
...
...
@@ -78,8 +78,11 @@ type Arg struct {
}
func
(
m
*
Arg
)
Reset
()
{
*
m
=
Arg
{}
}
func
(
m
*
Arg
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Arg
)
ProtoMessage
()
{}
func
(
*
Arg
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_4371b204df3ab2da
,
[]
int
{
0
}
}
...
...
model/pb/basic.pb.go
View file @
3098180c
...
...
@@ -30,8 +30,11 @@ type Uint64Slice struct {
}
func
(
m
*
Uint64Slice
)
Reset
()
{
*
m
=
Uint64Slice
{}
}
func
(
m
*
Uint64Slice
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Uint64Slice
)
ProtoMessage
()
{}
func
(
*
Uint64Slice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
0
}
}
...
...
@@ -80,8 +83,11 @@ type StringUint64Map struct {
}
func
(
m
*
StringUint64Map
)
Reset
()
{
*
m
=
StringUint64Map
{}
}
func
(
m
*
StringUint64Map
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StringUint64Map
)
ProtoMessage
()
{}
func
(
*
StringUint64Map
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
1
}
}
...
...
@@ -137,8 +143,11 @@ type StringUint64SliceMap struct {
}
func
(
m
*
StringUint64SliceMap
)
Reset
()
{
*
m
=
StringUint64SliceMap
{}
}
func
(
m
*
StringUint64SliceMap
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StringUint64SliceMap
)
ProtoMessage
()
{}
func
(
*
StringUint64SliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
2
}
}
...
...
@@ -194,8 +203,11 @@ type VerifiedIndex struct {
}
func
(
m
*
VerifiedIndex
)
Reset
()
{
*
m
=
VerifiedIndex
{}
}
func
(
m
*
VerifiedIndex
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VerifiedIndex
)
ProtoMessage
()
{}
func
(
*
VerifiedIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
3
}
}
...
...
@@ -250,8 +262,11 @@ type VerifiedIndexSlice struct {
}
func
(
m
*
VerifiedIndexSlice
)
Reset
()
{
*
m
=
VerifiedIndexSlice
{}
}
func
(
m
*
VerifiedIndexSlice
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VerifiedIndexSlice
)
ProtoMessage
()
{}
func
(
*
VerifiedIndexSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
4
}
}
...
...
@@ -300,8 +315,11 @@ type StringVerifiedIndexMap struct {
}
func
(
m
*
StringVerifiedIndexMap
)
Reset
()
{
*
m
=
StringVerifiedIndexMap
{}
}
func
(
m
*
StringVerifiedIndexMap
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StringVerifiedIndexMap
)
ProtoMessage
()
{}
func
(
*
StringVerifiedIndexMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
5
}
}
...
...
@@ -357,8 +375,11 @@ type StringVerifiedIndexSliceMap struct {
}
func
(
m
*
StringVerifiedIndexSliceMap
)
Reset
()
{
*
m
=
StringVerifiedIndexSliceMap
{}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
StringVerifiedIndexSliceMap
)
ProtoMessage
()
{}
func
(
*
StringVerifiedIndexSliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
6
}
}
...
...
model/pb/block.pb.go
View file @
3098180c
...
...
@@ -36,8 +36,11 @@ type Block struct {
}
func
(
m
*
Block
)
Reset
()
{
*
m
=
Block
{}
}
func
(
m
*
Block
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Block
)
ProtoMessage
()
{}
func
(
*
Block
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
0
}
}
...
...
@@ -106,8 +109,11 @@ type BlockHeader struct {
}
func
(
m
*
BlockHeader
)
Reset
()
{
*
m
=
BlockHeader
{}
}
func
(
m
*
BlockHeader
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BlockHeader
)
ProtoMessage
()
{}
func
(
*
BlockHeader
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
1
}
}
...
...
model/pb/broker.pb.go
View file @
3098180c
...
...
@@ -209,8 +209,11 @@ type GetBlockHeaderRequest struct {
}
func
(
m
*
GetBlockHeaderRequest
)
Reset
()
{
*
m
=
GetBlockHeaderRequest
{}
}
func
(
m
*
GetBlockHeaderRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlockHeaderRequest
)
ProtoMessage
()
{}
func
(
*
GetBlockHeaderRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
0
}
}
...
...
@@ -267,8 +270,11 @@ type GetInterchainTxWrappersRequest struct {
}
func
(
m
*
GetInterchainTxWrappersRequest
)
Reset
()
{
*
m
=
GetInterchainTxWrappersRequest
{}
}
func
(
m
*
GetInterchainTxWrappersRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetInterchainTxWrappersRequest
)
ProtoMessage
()
{}
func
(
*
GetInterchainTxWrappersRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
1
}
}
...
...
@@ -330,8 +336,11 @@ type TransactionHashMsg struct {
}
func
(
m
*
TransactionHashMsg
)
Reset
()
{
*
m
=
TransactionHashMsg
{}
}
func
(
m
*
TransactionHashMsg
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionHashMsg
)
ProtoMessage
()
{}
func
(
*
TransactionHashMsg
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
2
}
}
...
...
@@ -380,8 +389,11 @@ type GetBlockRequest struct {
}
func
(
m
*
GetBlockRequest
)
Reset
()
{
*
m
=
GetBlockRequest
{}
}
func
(
m
*
GetBlockRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlockRequest
)
ProtoMessage
()
{}
func
(
*
GetBlockRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
3
}
}
...
...
@@ -436,8 +448,11 @@ type Request struct {
}
func
(
m
*
Request
)
Reset
()
{
*
m
=
Request
{}
}
func
(
m
*
Request
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Request
)
ProtoMessage
()
{}
func
(
*
Request
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
4
}
}
...
...
@@ -485,8 +500,11 @@ type Response struct {
}
func
(
m
*
Response
)
Reset
()
{
*
m
=
Response
{}
}
func
(
m
*
Response
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Response
)
ProtoMessage
()
{}
func
(
*
Response
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
5
}
}
...
...
@@ -534,8 +552,11 @@ type SignResponse struct {
}
func
(
m
*
SignResponse
)
Reset
()
{
*
m
=
SignResponse
{}
}
func
(
m
*
SignResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SignResponse
)
ProtoMessage
()
{}
func
(
*
SignResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
6
}
}
...
...
@@ -583,8 +604,11 @@ type Address struct {
}
func
(
m
*
Address
)
Reset
()
{
*
m
=
Address
{}
}
func
(
m
*
Address
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Address
)
ProtoMessage
()
{}
func
(
*
Address
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
7
}
}
...
...
@@ -633,8 +657,11 @@ type GetBlocksRequest struct {
}
func
(
m
*
GetBlocksRequest
)
Reset
()
{
*
m
=
GetBlocksRequest
{}
}
func
(
m
*
GetBlocksRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlocksRequest
)
ProtoMessage
()
{}
func
(
*
GetBlocksRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
8
}
}
...
...
@@ -689,8 +716,11 @@ type GetBlocksResponse struct {
}
func
(
m
*
GetBlocksResponse
)
Reset
()
{
*
m
=
GetBlocksResponse
{}
}
func
(
m
*
GetBlocksResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlocksResponse
)
ProtoMessage
()
{}
func
(
*
GetBlocksResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
9
}
}
...
...
@@ -739,8 +769,11 @@ type GetBlockHeadersRequest struct {
}
func
(
m
*
GetBlockHeadersRequest
)
Reset
()
{
*
m
=
GetBlockHeadersRequest
{}
}
func
(
m
*
GetBlockHeadersRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlockHeadersRequest
)
ProtoMessage
()
{}
func
(
*
GetBlockHeadersRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
10
}
}
...
...
@@ -795,8 +828,11 @@ type GetBlockHeadersResponse struct {
}
func
(
m
*
GetBlockHeadersResponse
)
Reset
()
{
*
m
=
GetBlockHeadersResponse
{}
}
func
(
m
*
GetBlockHeadersResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetBlockHeadersResponse
)
ProtoMessage
()
{}
func
(
*
GetBlockHeadersResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
11
}
}
...
...
@@ -845,8 +881,11 @@ type SubscriptionRequest struct {
}
func
(
m
*
SubscriptionRequest
)
Reset
()
{
*
m
=
SubscriptionRequest
{}
}
func
(
m
*
SubscriptionRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SubscriptionRequest
)
ProtoMessage
()
{}
func
(
*
SubscriptionRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
12
}
}
...
...
@@ -902,8 +941,11 @@ type GetMultiSignsRequest struct {
}
func
(
m
*
GetMultiSignsRequest
)
Reset
()
{
*
m
=
GetMultiSignsRequest
{}
}
func
(
m
*
GetMultiSignsRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetMultiSignsRequest
)
ProtoMessage
()
{}
func
(
*
GetMultiSignsRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
13
}
}
...
...
@@ -959,8 +1001,11 @@ type GetTransactionResponse struct {
}
func
(
m
*
GetTransactionResponse
)
Reset
()
{
*
m
=
GetTransactionResponse
{}
}
func
(
m
*
GetTransactionResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetTransactionResponse
)
ProtoMessage
()
{}
func
(
*
GetTransactionResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
14
}
}
...
...
@@ -1016,8 +1061,11 @@ type VerifiedTx struct {
}
func
(
m
*
VerifiedTx
)
Reset
()
{
*
m
=
VerifiedTx
{}
}
func
(
m
*
VerifiedTx
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VerifiedTx
)
ProtoMessage
()
{}
func
(
*
VerifiedTx
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
15
}
}
...
...
@@ -1074,8 +1122,11 @@ type InterchainTxWrapper struct {
}
func
(
m
*
InterchainTxWrapper
)
Reset
()
{
*
m
=
InterchainTxWrapper
{}
}
func
(
m
*
InterchainTxWrapper
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InterchainTxWrapper
)
ProtoMessage
()
{}
func
(
*
InterchainTxWrapper
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
16
}
}
...
...
@@ -1130,8 +1181,11 @@ type InterchainTxWrappers struct {
}
func
(
m
*
InterchainTxWrappers
)
Reset
()
{
*
m
=
InterchainTxWrappers
{}
}
func
(
m
*
InterchainTxWrappers
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InterchainTxWrappers
)
ProtoMessage
()
{}
func
(
*
InterchainTxWrappers
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
17
}
}
...
...
@@ -1180,8 +1234,11 @@ type GetTPSRequest struct {
}
func
(
m
*
GetTPSRequest
)
Reset
()
{
*
m
=
GetTPSRequest
{}
}
func
(
m
*
GetTPSRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetTPSRequest
)
ProtoMessage
()
{}
func
(
*
GetTPSRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
18
}
}
...
...
@@ -1236,8 +1293,11 @@ type DelVPNodeRequest struct {
}
func
(
m
*
DelVPNodeRequest
)
Reset
()
{
*
m
=
DelVPNodeRequest
{}
}
func
(
m
*
DelVPNodeRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
DelVPNodeRequest
)
ProtoMessage
()
{}
func
(
*
DelVPNodeRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
19
}
}
...
...
@@ -1287,8 +1347,11 @@ type SidecarInfo struct {
}
func
(
m
*
SidecarInfo
)
Reset
()
{
*
m
=
SidecarInfo
{}
}
func
(
m
*
SidecarInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SidecarInfo
)
ProtoMessage
()
{}
func
(
*
SidecarInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
20
}
}
...
...
@@ -1351,8 +1414,11 @@ type CheckSidecarResponse struct {
}
func
(
m
*
CheckSidecarResponse
)
Reset
()
{
*
m
=
CheckSidecarResponse
{}
}
func
(
m
*
CheckSidecarResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CheckSidecarResponse
)
ProtoMessage
()
{}
func
(
*
CheckSidecarResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
21
}
}
...
...
@@ -1407,8 +1473,11 @@ type HeartBeatRespones struct {
}
func
(
m
*
HeartBeatRespones
)
Reset
()
{
*
m
=
HeartBeatRespones
{}
}
func
(
m
*
HeartBeatRespones
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
HeartBeatRespones
)
ProtoMessage
()
{}
func
(
*
HeartBeatRespones
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_f209535e190f2bed
,
[]
int
{
22
}
}
...
...
model/pb/bxh_transaction.pb.go
View file @
3098180c
...
...
@@ -157,8 +157,11 @@ type BxhTransaction struct {
}
func
(
m
*
BxhTransaction
)
Reset
()
{
*
m
=
BxhTransaction
{}
}
func
(
m
*
BxhTransaction
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
BxhTransaction
)
ProtoMessage
()
{}
func
(
*
BxhTransaction
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
0
}
}
...
...
@@ -259,8 +262,11 @@ type TransactionData struct {
}
func
(
m
*
TransactionData
)
Reset
()
{
*
m
=
TransactionData
{}
}
func
(
m
*
TransactionData
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionData
)
ProtoMessage
()
{}
func
(
*
TransactionData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
1
}
}
...
...
@@ -337,8 +343,11 @@ type InvokePayload struct {
}
func
(
m
*
InvokePayload
)
Reset
()
{
*
m
=
InvokePayload
{}
}
func
(
m
*
InvokePayload
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InvokePayload
)
ProtoMessage
()
{}
func
(
*
InvokePayload
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
2
}
}
...
...
@@ -395,8 +404,11 @@ type TransactionMeta struct {
}
func
(
m
*
TransactionMeta
)
Reset
()
{
*
m
=
TransactionMeta
{}
}
func
(
m
*
TransactionMeta
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionMeta
)
ProtoMessage
()
{}
func
(
*
TransactionMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
3
}
}
...
...
@@ -460,8 +472,11 @@ type CrosschainTransactionExtra struct {
}
func
(
m
*
CrosschainTransactionExtra
)
Reset
()
{
*
m
=
CrosschainTransactionExtra
{}
}
func
(
m
*
CrosschainTransactionExtra
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CrosschainTransactionExtra
)
ProtoMessage
()
{}
func
(
*
CrosschainTransactionExtra
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
4
}
}
...
...
@@ -524,8 +539,11 @@ type TransactionTracingMeta struct {
}
func
(
m
*
TransactionTracingMeta
)
Reset
()
{
*
m
=
TransactionTracingMeta
{}
}
func
(
m
*
TransactionTracingMeta
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionTracingMeta
)
ProtoMessage
()
{}
func
(
*
TransactionTracingMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
5
}
}
...
...
@@ -581,8 +599,11 @@ type TransactionSlice struct {
}
func
(
m
*
TransactionSlice
)
Reset
()
{
*
m
=
TransactionSlice
{}
}
func
(
m
*
TransactionSlice
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionSlice
)
ProtoMessage
()
{}
func
(
*
TransactionSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
6
}
}
...
...
@@ -643,8 +664,11 @@ type AssetExchangeInfo struct {
}
func
(
m
*
AssetExchangeInfo
)
Reset
()
{
*
m
=
AssetExchangeInfo
{}
}
func
(
m
*
AssetExchangeInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
AssetExchangeInfo
)
ProtoMessage
()
{}
func
(
*
AssetExchangeInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
7
}
}
...
...
model/pb/chain.pb.go
View file @
3098180c
...
...
@@ -34,8 +34,11 @@ type ChainMeta struct {
}
func
(
m
*
ChainMeta
)
Reset
()
{
*
m
=
ChainMeta
{}
}
func
(
m
*
ChainMeta
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ChainMeta
)
ProtoMessage
()
{}
func
(
*
ChainMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d4d91b2d037e7a44
,
[]
int
{
0
}
}
...
...
model/pb/commit.pb.go
View file @
3098180c
...
...
@@ -31,8 +31,11 @@ type CommitEvent struct {
}
func
(
m
*
CommitEvent
)
Reset
()
{
*
m
=
CommitEvent
{}
}
func
(
m
*
CommitEvent
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CommitEvent
)
ProtoMessage
()
{}
func
(
*
CommitEvent
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_db7163399a465f48
,
[]
int
{
0
}
}
...
...
model/pb/ibtp.pb.go
View file @
3098180c
...
...
@@ -118,8 +118,11 @@ type IBTP struct {
}
func
(
m
*
IBTP
)
Reset
()
{
*
m
=
IBTP
{}
}
func
(
m
*
IBTP
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
IBTP
)
ProtoMessage
()
{}
func
(
*
IBTP
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
0
}
}
...
...
@@ -231,8 +234,11 @@ type Payload struct {
}
func
(
m
*
Payload
)
Reset
()
{
*
m
=
Payload
{}
}
func
(
m
*
Payload
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Payload
)
ProtoMessage
()
{}
func
(
*
Payload
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
1
}
}
...
...
@@ -294,8 +300,11 @@ type Content struct {
}
func
(
m
*
Content
)
Reset
()
{
*
m
=
Content
{}
}
func
(
m
*
Content
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Content
)
ProtoMessage
()
{}
func
(
*
Content
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
2
}
}
...
...
@@ -392,8 +401,11 @@ type IBTPs struct {
}
func
(
m
*
IBTPs
)
Reset
()
{
*
m
=
IBTPs
{}
}
func
(
m
*
IBTPs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
IBTPs
)
ProtoMessage
()
{}
func
(
*
IBTPs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
3
}
}
...
...
model/pb/ibtpx.pb.go
View file @
3098180c
...
...
@@ -36,8 +36,11 @@ type IBTPX struct {
}
func
(
m
*
IBTPX
)
Reset
()
{
*
m
=
IBTPX
{}
}
func
(
m
*
IBTPX
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
IBTPX
)
ProtoMessage
()
{}
func
(
*
IBTPX
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8402d80e061d514a
,
[]
int
{
0
}
}
...
...
model/pb/interchain_meta.pb.go
View file @
3098180c
...
...
@@ -33,8 +33,11 @@ type InterchainMetaS struct {
}
func
(
m
*
InterchainMetaS
)
Reset
()
{
*
m
=
InterchainMetaS
{}
}
func
(
m
*
InterchainMetaS
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InterchainMetaS
)
ProtoMessage
()
{}
func
(
*
InterchainMetaS
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
0
}
}
...
...
@@ -85,8 +88,11 @@ type InterchainS struct {
}
func
(
m
*
InterchainS
)
Reset
()
{
*
m
=
InterchainS
{}
}
func
(
m
*
InterchainS
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InterchainS
)
ProtoMessage
()
{}
func
(
*
InterchainS
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
1
}
}
...
...
model/pb/message.pb.go
View file @
3098180c
...
...
@@ -88,8 +88,11 @@ type Message struct {
}
func
(
m
*
Message
)
Reset
()
{
*
m
=
Message
{}
}
func
(
m
*
Message
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Message
)
ProtoMessage
()
{}
func
(
*
Message
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
0
}
}
...
...
@@ -152,8 +155,11 @@ type Pack struct {
}
func
(
m
*
Pack
)
Reset
()
{
*
m
=
Pack
{}
}
func
(
m
*
Pack
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Pack
)
ProtoMessage
()
{}
func
(
*
Pack
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
1
}
}
...
...
@@ -209,8 +215,11 @@ type PeerInfo struct {
}
func
(
m
*
PeerInfo
)
Reset
()
{
*
m
=
PeerInfo
{}
}
func
(
m
*
PeerInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PeerInfo
)
ProtoMessage
()
{}
func
(
*
PeerInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
2
}
}
...
...
model/pb/plugin.pb.go
View file @
3098180c
...
...
@@ -32,8 +32,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type
Empty
struct
{}
func
(
m
*
Empty
)
Reset
()
{
*
m
=
Empty
{}
}
func
(
m
*
Empty
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Empty
)
ProtoMessage
()
{}
func
(
*
Empty
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
0
}
}
...
...
@@ -76,8 +79,11 @@ type InitializeRequest struct {
}
func
(
m
*
InitializeRequest
)
Reset
()
{
*
m
=
InitializeRequest
{}
}
func
(
m
*
InitializeRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
InitializeRequest
)
ProtoMessage
()
{}
func
(
*
InitializeRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
1
}
}
...
...
@@ -141,8 +147,11 @@ type SubmitIBTPResponse struct {
}
func
(
m
*
SubmitIBTPResponse
)
Reset
()
{
*
m
=
SubmitIBTPResponse
{}
}
func
(
m
*
SubmitIBTPResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SubmitIBTPResponse
)
ProtoMessage
()
{}
func
(
*
SubmitIBTPResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
2
}
}
...
...
@@ -205,8 +214,11 @@ type RollbackIBTPRequest struct {
}
func
(
m
*
RollbackIBTPRequest
)
Reset
()
{
*
m
=
RollbackIBTPRequest
{}
}
func
(
m
*
RollbackIBTPRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RollbackIBTPRequest
)
ProtoMessage
()
{}
func
(
*
RollbackIBTPRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
3
}
}
...
...
@@ -262,8 +274,11 @@ type RollbackIBTPResponse struct {
}
func
(
m
*
RollbackIBTPResponse
)
Reset
()
{
*
m
=
RollbackIBTPResponse
{}
}
func
(
m
*
RollbackIBTPResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RollbackIBTPResponse
)
ProtoMessage
()
{}
func
(
*
RollbackIBTPResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
4
}
}
...
...
@@ -319,8 +334,11 @@ type GetOutMessageRequest struct {
}
func
(
m
*
GetOutMessageRequest
)
Reset
()
{
*
m
=
GetOutMessageRequest
{}
}
func
(
m
*
GetOutMessageRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetOutMessageRequest
)
ProtoMessage
()
{}
func
(
*
GetOutMessageRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
5
}
}
...
...
@@ -376,8 +394,11 @@ type GetInMessageRequest struct {
}
func
(
m
*
GetInMessageRequest
)
Reset
()
{
*
m
=
GetInMessageRequest
{}
}
func
(
m
*
GetInMessageRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetInMessageRequest
)
ProtoMessage
()
{}
func
(
*
GetInMessageRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
6
}
}
...
...
@@ -432,8 +453,11 @@ type GetInMessageResponse struct {
}
func
(
m
*
GetInMessageResponse
)
Reset
()
{
*
m
=
GetInMessageResponse
{}
}
func
(
m
*
GetInMessageResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetInMessageResponse
)
ProtoMessage
()
{}
func
(
*
GetInMessageResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
7
}
}
...
...
@@ -481,8 +505,11 @@ type GetMetaResponse struct {
}
func
(
m
*
GetMetaResponse
)
Reset
()
{
*
m
=
GetMetaResponse
{}
}
func
(
m
*
GetMetaResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
GetMetaResponse
)
ProtoMessage
()
{}
func
(
*
GetMetaResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
8
}
}
...
...
@@ -530,8 +557,11 @@ type NameResponse struct {
}
func
(
m
*
NameResponse
)
Reset
()
{
*
m
=
NameResponse
{}
}
func
(
m
*
NameResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
NameResponse
)
ProtoMessage
()
{}
func
(
*
NameResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
9
}
}
...
...
@@ -579,8 +609,11 @@ type TypeResponse struct {
}
func
(
m
*
TypeResponse
)
Reset
()
{
*
m
=
TypeResponse
{}
}
func
(
m
*
TypeResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TypeResponse
)
ProtoMessage
()
{}
func
(
*
TypeResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_22a625af4bc1cc87
,
[]
int
{
10
}
}
...
...
model/pb/receipt.pb.go
View file @
3098180c
...
...
@@ -65,8 +65,11 @@ type Receipt struct {
}
func
(
m
*
Receipt
)
Reset
()
{
*
m
=
Receipt
{}
}
func
(
m
*
Receipt
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Receipt
)
ProtoMessage
()
{}
func
(
*
Receipt
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
0
}
}
...
...
@@ -149,8 +152,11 @@ type Receipts struct {
}
func
(
m
*
Receipts
)
Reset
()
{
*
m
=
Receipts
{}
}
func
(
m
*
Receipts
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Receipts
)
ProtoMessage
()
{}
func
(
*
Receipts
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
1
}
}
...
...
@@ -202,8 +208,11 @@ type Event struct {
}
func
(
m
*
Event
)
Reset
()
{
*
m
=
Event
{}
}
func
(
m
*
Event
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Event
)
ProtoMessage
()
{}
func
(
*
Event
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
2
}
}
...
...
@@ -266,8 +275,11 @@ type EvmLog struct {
}
func
(
m
*
EvmLog
)
Reset
()
{
*
m
=
EvmLog
{}
}
func
(
m
*
EvmLog
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
EvmLog
)
ProtoMessage
()
{}
func
(
*
EvmLog
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
3
}
}
...
...
model/pb/transaction.go
View file @
3098180c
...
...
@@ -55,7 +55,9 @@ type Transactions struct {
}
func
(
txs
*
Transactions
)
Reset
()
{
*
txs
=
Transactions
{}
}
func
(
txs
*
Transactions
)
String
()
string
{
return
proto
.
CompactTextString
(
txs
)
}
func
(
txs
*
Transactions
)
ProtoMessage
()
{}
func
(
txs
*
Transactions
)
MarshalTo
(
data
[]
byte
)
(
int
,
error
)
{
...
...
model/pb/vp_info.pb.go
View file @
3098180c
...
...
@@ -33,8 +33,11 @@ type VpInfo struct {
}
func
(
m
*
VpInfo
)
Reset
()
{
*
m
=
VpInfo
{}
}
func
(
m
*
VpInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
VpInfo
)
ProtoMessage
()
{}
func
(
*
VpInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7477e72a440db3af
,
[]
int
{
0
}
}
...
...
pkg/plugins/grpc.go
View file @
3098180c
...
...
@@ -6,6 +6,7 @@ import (
"github.com/Rican7/retry"
"github.com/Rican7/retry/strategy"
"github.com/link33/sidecar/model/pb"
)
...
...
pkg/plugins/interface.go
View file @
3098180c
...
...
@@ -3,7 +3,6 @@ package plugins
import
(
"github.com/link33/sidecar/internal"
"github.com/link33/sidecar/model/pb"
//"github.com/link33/sidecar/internal/port"
)
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go
...
...
pkg/plugins/mock_client/mock_client.go
View file @
3098180c
...
...
@@ -8,6 +8,7 @@ import (
reflect
"reflect"
gomock
"github.com/golang/mock/gomock"
pb
"github.com/link33/sidecar/model/pb"
plugins
"github.com/link33/sidecar/pkg/plugins"
)
...
...
pkg/plugins/plugin.go
View file @
3098180c
...
...
@@ -4,8 +4,9 @@ import (
"context"
"github.com/hashicorp/go-plugin"
"github.com/link33/sidecar/model/pb"
"google.golang.org/grpc"
"github.com/link33/sidecar/model/pb"
)
// Handshake is a common handshake that is shared by plugin and host.
...
...
@@ -43,7 +44,7 @@ func (p *AppchainGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Serve
func
(
p
*
AppchainGRPCPlugin
)
GRPCClient
(
ctx
context
.
Context
,
broker
*
plugin
.
GRPCBroker
,
c
*
grpc
.
ClientConn
)
(
interface
{},
error
)
{
return
&
GRPCClient
{
client
:
pb
.
NewAppchainPluginClient
(
c
),
// 创建gRPC客户端的方法是自动生成的
d
oneContext
:
ctx
,
D
oneContext
:
ctx
,
},
nil
}
...
...
pkg/plugins/start.go
View file @
3098180c
...
...
@@ -7,6 +7,7 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin"
"github.com/link33/sidecar/internal/repo"
)
...
...
pkg/plugins/plugin_test.go
→
pkg/plugins/
test/
plugin_test.go
View file @
3098180c
package
plugins
package
test
import
(
"context"
...
...
@@ -7,12 +7,14 @@ import (
"time"
"github.com/golang/mock/gomock"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/plugins/mock_client"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"github.com/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/plugins"
"github.com/link33/sidecar/pkg/plugins/mock_client"
)
const
(
...
...
@@ -29,7 +31,7 @@ func TestCreateClient(t *testing.T) {
Plugin
:
"appchain_plugin"
,
}
_
,
_
,
err
:=
CreateClient
(
from
,
appchainConfig
,
make
([]
byte
,
0
))
_
,
_
,
err
:=
plugins
.
CreateClient
(
from
,
appchainConfig
,
make
([]
byte
,
0
))
require
.
NotNil
(
t
,
err
)
}
...
...
@@ -38,7 +40,7 @@ func TestGRPCServer_Error(t *testing.T) {
mockCtl
:=
gomock
.
NewController
(
t
)
mockCtl
.
Finish
()
cli
:=
mock_client
.
NewMockClient
(
mockCtl
)
grpcServer
:=
GRPCServer
{
cli
}
grpcServer
:=
plugins
.
GRPCServer
{
cli
}
cli
.
EXPECT
()
.
GetInMeta
()
.
Return
(
nil
,
fmt
.
Errorf
(
"get in meta error"
))
.
AnyTimes
()
cli
.
EXPECT
()
.
GetOutMeta
()
.
Return
(
nil
,
fmt
.
Errorf
(
"get out meta error"
))
.
AnyTimes
()
...
...
@@ -59,7 +61,7 @@ func TestGRPCServer(t *testing.T) {
mockCtl
:=
gomock
.
NewController
(
t
)
mockCtl
.
Finish
()
cli
:=
mock_client
.
NewMockClient
(
mockCtl
)
grpcServer
:=
GRPCServer
{
cli
}
grpcServer
:=
plugins
.
GRPCServer
{
cli
}
initReq
:=
&
pb
.
InitializeRequest
{
ConfigPath
:
configPath
,
SidecarId
:
from
,
...
...
@@ -181,7 +183,7 @@ func TestGRPCClient(t *testing.T) {
ibtp
,
err
:=
grpcClient
.
GetOutMessage
(
to
,
uint64
(
1
))
require
.
Nil
(
t
,
err
)
require
.
Equal
(
t
,
to
,
ibtp
.
To
)
require
.
Equal
(
t
,
uint64
(
1
),
ibtp
.
Index
)
require
.
Equal
(
t
,
uint64
(
1
),
ibtp
.
Nonce
)
_
,
err
=
grpcClient
.
GetInMessage
(
from
,
uint64
(
1
))
require
.
Nil
(
t
,
err
)
...
...
@@ -214,7 +216,7 @@ func TestGRPCClient(t *testing.T) {
ibtp
=
&
pb
.
IBTP
{
From
:
"from"
,
To
:
"to"
,
Index
:
1
,
Nonce
:
1
,
}
_
,
err
=
grpcClient
.
GetReceipt
(
ibtp
)
require
.
Nil
(
t
,
err
)
...
...
@@ -227,7 +229,7 @@ func TestAppchainGRPCPlugin_GRPCClient(t *testing.T) {
mockCtl
:=
gomock
.
NewController
(
t
)
mockCtl
.
Finish
()
cli
:=
mock_client
.
NewMockClient
(
mockCtl
)
grpcPlugin
:=
AppchainGRPCPlugin
{
grpcPlugin
:=
plugins
.
AppchainGRPCPlugin
{
Impl
:
cli
,
}
...
...
@@ -239,7 +241,7 @@ func TestAppchainGRPCPlugin_GRPCServer(t *testing.T) {
mockCtl
:=
gomock
.
NewController
(
t
)
mockCtl
.
Finish
()
cli
:=
mock_client
.
NewMockClient
(
mockCtl
)
grpcPlugin
:=
AppchainGRPCPlugin
{
grpcPlugin
:=
plugins
.
AppchainGRPCPlugin
{
Impl
:
cli
,
}
...
...
@@ -248,11 +250,8 @@ func TestAppchainGRPCPlugin_GRPCServer(t *testing.T) {
})
}
func
getGRPCClient
(
ctx
context
.
Context
,
mc
*
mockAppchainPluginClient
)
(
*
GRPCClient
,
error
)
{
return
&
GRPCClient
{
client
:
mc
,
doneContext
:
ctx
,
},
nil
func
getGRPCClient
(
ctx
context
.
Context
,
mc
*
mockAppchainPluginClient
)
(
*
plugins
.
GRPCClient
,
error
)
{
return
&
plugins
.
GRPCClient
{},
nil
}
//==========================================================
...
...
@@ -300,7 +299,7 @@ func (mc *mockAppchainPluginClient) SubmitIBTP(ctx context.Context, in *pb.IBTP,
func
(
mc
*
mockAppchainPluginClient
)
GetOutMessage
(
ctx
context
.
Context
,
in
*
pb
.
GetOutMessageRequest
,
opts
...
grpc
.
CallOption
)
(
*
pb
.
IBTP
,
error
)
{
return
&
pb
.
IBTP
{
To
:
in
.
To
,
Index
:
in
.
Idx
,
Nonce
:
in
.
Idx
,
Timestamp
:
time
.
Now
()
.
UnixNano
(),
},
nil
}
...
...
@@ -368,7 +367,7 @@ func (mc *mockAppchainPluginClient) GetReceipt(ctx context.Context, in *pb.IBTP,
return
&
pb
.
IBTP
{
From
:
in
.
From
,
To
:
in
.
To
,
Index
:
in
.
Index
,
Nonce
:
in
.
Nonce
,
Timestamp
:
time
.
Now
()
.
UnixNano
(),
Type
:
pb
.
IBTP_RECEIPT_SUCCESS
,
},
nil
...
...
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