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
27e44da6
Commit
27e44da6
authored
Sep 16, 2021
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make fmt
parent
65c121b8
Pipeline
#8004
failed with stages
Changes
50
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
456 additions
and
197 deletions
+456
-197
appchain_bxh.go
cmd/sidecar/appchain_bxh.go
+1
-2
rule.go
cmd/sidecar/rule.go
+1
-1
sidecar.go
cmd/sidecar/sidecar.go
+3
-3
start.go
cmd/sidecar/start.go
+3
-5
client.go
hub/client/client.go
+30
-30
types.go
hub/client/types.go
+1
-0
sidecar.go
internal/app/sidecar.go
+3
-3
appchain.go
internal/appchain/appchain.go
+1
-1
monitor.go
internal/appchain/monitor.go
+1
-1
port.go
internal/appchain/port.go
+9
-9
checker.go
internal/checker/checker.go
+1
-2
checker_test.go
internal/checker/checker_test.go
+1
-2
logger_test.go
internal/loggers/logger_test.go
+5
-5
manager.go
internal/manger/manager.go
+1
-1
helper.go
internal/peermgr/helper.go
+1
-1
helper_test.go
internal/peermgr/helper_test.go
+1
-3
local.go
internal/peermgr/local.go
+5
-6
peermgr.go
internal/peermgr/peermgr.go
+4
-2
peermgr_test.go
internal/peermgr/peermgr_test.go
+5
-11
swarm.go
internal/peermgr/swarm.go
+7
-5
const.go
internal/port/const.go
+3
-3
map.go
internal/port/map.go
+3
-3
config.go
internal/repo/config.go
+2
-2
repo.go
internal/repo/repo.go
+3
-3
interface.go
internal/router/interface.go
+13
-13
router.go
internal/router/router.go
+13
-12
interface.go
internal/syncer/interface.go
+8
-8
syncer.go
internal/syncer/syncer.go
+3
-5
syncer_test.go
internal/syncer/syncer_test.go
+5
-5
arg.pb.go
model/pb/arg.pb.go
+14
-3
basic.pb.go
model/pb/basic.pb.go
+50
-3
block.pb.go
model/pb/block.pb.go
+20
-3
broker.pb.go
model/pb/broker.pb.go
+0
-0
broker.pb.gw.go
model/pb/broker.pb.gw.go
+0
-0
bxh_transaction.pb.go
model/pb/bxh_transaction.pb.go
+56
-3
chain.pb.go
model/pb/chain.pb.go
+14
-3
commit.pb.go
model/pb/commit.pb.go
+14
-3
ibtp.pb.go
model/pb/ibtp.pb.go
+32
-3
ibtpx.pb.go
model/pb/ibtpx.pb.go
+14
-3
interchain_meta.pb.go
model/pb/interchain_meta.pb.go
+20
-3
message.pb.go
model/pb/message.pb.go
+27
-4
plugin.pb.go
model/pb/plugin.pb.go
+0
-0
receipt.go
model/pb/receipt.go
+1
-1
receipt.pb.go
model/pb/receipt.pb.go
+32
-3
vp_info.pb.go
model/pb/vp_info.pb.go
+14
-3
grpc.go
pkg/plugins/grpc.go
+1
-1
interface.go
pkg/plugins/interface.go
+1
-1
plugin.go
pkg/plugins/plugin.go
+3
-3
plugin_test.go
pkg/plugins/plugin_test.go
+2
-5
start.go
pkg/plugins/start.go
+4
-2
No files found.
cmd/sidecar/appchain_bxh.go
View file @
27e44da6
...
@@ -340,7 +340,6 @@ func getAppchain(ctx *cli.Context) error {
...
@@ -340,7 +340,6 @@ func getAppchain(ctx *cli.Context) error {
constant
.
AppchainMgrContractAddr
.
Address
(),
constant
.
AppchainMgrContractAddr
.
Address
(),
"GetAppchain"
,
nil
,
rpcx
.
String
(
id
),
"GetAppchain"
,
nil
,
rpcx
.
String
(
id
),
)
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -364,7 +363,7 @@ func getAppchain(ctx *cli.Context) error {
...
@@ -364,7 +363,7 @@ func getAppchain(ctx *cli.Context) error {
return
nil
return
nil
}
}
//TODO
//
TODO
func
loadClient
(
keyPath
string
,
grpcAddrs
[]
string
,
ctx
*
cli
.
Context
)
(
rpcx
.
Client
,
error
)
{
func
loadClient
(
keyPath
string
,
grpcAddrs
[]
string
,
ctx
*
cli
.
Context
)
(
rpcx
.
Client
,
error
)
{
repoRoot
,
err
:=
repo
.
PathRootWithDefault
(
ctx
.
GlobalString
(
"repo"
))
repoRoot
,
err
:=
repo
.
PathRootWithDefault
(
ctx
.
GlobalString
(
"repo"
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
cmd/sidecar/rule.go
View file @
27e44da6
...
@@ -138,7 +138,7 @@ func updateMasterRule(ctx *cli.Context) error {
...
@@ -138,7 +138,7 @@ func updateMasterRule(ctx *cli.Context) error {
return
nil
return
nil
}
}
//TODO
//
TODO
func
bindRule
(
ctx
*
cli
.
Context
)
error
{
func
bindRule
(
ctx
*
cli
.
Context
)
error
{
ruleAddr
:=
ctx
.
String
(
"addr"
)
ruleAddr
:=
ctx
.
String
(
"addr"
)
method
:=
ctx
.
String
(
"method"
)
method
:=
ctx
.
String
(
"method"
)
...
...
cmd/sidecar/sidecar.go
View file @
27e44da6
...
@@ -30,14 +30,14 @@ func main() {
...
@@ -30,14 +30,14 @@ func main() {
}
}
app
.
Commands
=
[]
cli
.
Command
{
app
.
Commands
=
[]
cli
.
Command
{
//appchainBxhCMD,
//
appchainBxhCMD,
//client.LoadClientCMD(),
//
client.LoadClientCMD(),
idCMD
,
idCMD
,
initCMD
,
initCMD
,
interchainCMD
,
interchainCMD
,
p2pCMD
,
p2pCMD
,
toolCMD
,
toolCMD
,
//ruleCMD,
//
ruleCMD,
startCMD
,
startCMD
,
versionCMD
,
versionCMD
,
governanceCMD
,
governanceCMD
,
...
...
cmd/sidecar/start.go
View file @
27e44da6
...
@@ -19,13 +19,11 @@ import (
...
@@ -19,13 +19,11 @@ import (
"github.com/urfave/cli"
"github.com/urfave/cli"
)
)
var
(
var
startCMD
=
cli
.
Command
{
startCMD
=
cli
.
Command
{
Name
:
"start"
,
Name
:
"start"
,
Usage
:
"Start a long-running daemon process"
,
Usage
:
"Start a long-running daemon process"
,
Action
:
start
,
Action
:
start
,
}
}
)
func
start
(
ctx
*
cli
.
Context
)
error
{
func
start
(
ctx
*
cli
.
Context
)
error
{
fmt
.
Println
(
getVersion
(
true
))
fmt
.
Println
(
getVersion
(
true
))
...
@@ -81,7 +79,7 @@ func start(ctx *cli.Context) error {
...
@@ -81,7 +79,7 @@ func start(ctx *cli.Context) error {
}
}
func
handleShutdown
(
sidecar
internal
.
Launcher
,
wg
*
sync
.
WaitGroup
)
{
func
handleShutdown
(
sidecar
internal
.
Launcher
,
wg
*
sync
.
WaitGroup
)
{
var
stop
=
make
(
chan
os
.
Signal
)
stop
:
=
make
(
chan
os
.
Signal
)
signal
.
Notify
(
stop
,
syscall
.
SIGTERM
)
signal
.
Notify
(
stop
,
syscall
.
SIGTERM
)
signal
.
Notify
(
stop
,
syscall
.
SIGINT
)
signal
.
Notify
(
stop
,
syscall
.
SIGINT
)
...
...
hub/client/client.go
View file @
27e44da6
...
@@ -16,79 +16,79 @@ const (
...
@@ -16,79 +16,79 @@ const (
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source client.go
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source client.go
type
Client
interface
{
type
Client
interface
{
//Close all connections between link33 and the client.
//
Close all connections between link33 and the client.
Stop
()
error
Stop
()
error
//Reset ecdsa key.
//
Reset ecdsa key.
SetPrivateKey
(
crypto
.
PrivateKey
)
SetPrivateKey
(
crypto
.
PrivateKey
)
//Send a readonly transaction to link33. If the transaction is writable,
//
Send a readonly transaction to link33. If the transaction is writable,
// this transaction will not be executed and error wil be returned.
// this transaction will not be executed and error wil be returned.
SendView
(
tx
*
pb
.
BxhTransaction
)
(
*
pb
.
Receipt
,
error
)
SendView
(
tx
*
pb
.
BxhTransaction
)
(
*
pb
.
Receipt
,
error
)
//Send a signed transaction to link33. If the signature is illegal,
//
Send a signed transaction to link33. If the signature is illegal,
//the transaction hash will be obtained but the transaction receipt is illegal.
//
the transaction hash will be obtained but the transaction receipt is illegal.
SendTransaction
(
tx
*
pb
.
BxhTransaction
,
opts
*
TransactOpts
)
(
string
,
error
)
SendTransaction
(
tx
*
pb
.
BxhTransaction
,
opts
*
TransactOpts
)
(
string
,
error
)
//Send transaction to link33 and get the receipt.
//
Send transaction to link33 and get the receipt.
SendTransactionWithReceipt
(
tx
*
pb
.
BxhTransaction
,
opts
*
TransactOpts
)
(
*
pb
.
Receipt
,
error
)
SendTransactionWithReceipt
(
tx
*
pb
.
BxhTransaction
,
opts
*
TransactOpts
)
(
*
pb
.
Receipt
,
error
)
//Get the receipt by transaction hash,
//
Get the receipt by transaction hash,
//the status of the receipt is a sign of whether the transaction is successful.
//
the status of the receipt is a sign of whether the transaction is successful.
GetReceipt
(
hash
string
)
(
*
pb
.
Receipt
,
error
)
GetReceipt
(
hash
string
)
(
*
pb
.
Receipt
,
error
)
//Get transaction from link33 by transaction hash.
//
Get transaction from link33 by transaction hash.
GetTransaction
(
hash
string
)
(
*
pb
.
GetTransactionResponse
,
error
)
GetTransaction
(
hash
string
)
(
*
pb
.
GetTransactionResponse
,
error
)
//Get the current blockchain situation of link33.
//
Get the current blockchain situation of link33.
GetChainMeta
()
(
*
pb
.
ChainMeta
,
error
)
GetChainMeta
()
(
*
pb
.
ChainMeta
,
error
)
//Get blocks of the specified block height range.
//
Get blocks of the specified block height range.
GetBlocks
(
start
uint64
,
end
uint64
)
(
*
pb
.
GetBlocksResponse
,
error
)
GetBlocks
(
start
uint64
,
end
uint64
)
(
*
pb
.
GetBlocksResponse
,
error
)
//Obtain block information from link33.
//
Obtain block information from link33.
//The block header contains the basic information of the block,
//
The block header contains the basic information of the block,
//and the block body contains all the transactions packaged.
//
and the block body contains all the transactions packaged.
GetBlock
(
value
string
,
blockType
pb
.
GetBlockRequest_Type
)
(
*
pb
.
Block
,
error
)
GetBlock
(
value
string
,
blockType
pb
.
GetBlockRequest_Type
)
(
*
pb
.
Block
,
error
)
//Get the status of the blockchain from link33, normal or abnormal.
//
Get the status of the blockchain from link33, normal or abnormal.
GetChainStatus
()
(
*
pb
.
Response
,
error
)
GetChainStatus
()
(
*
pb
.
Response
,
error
)
//Get the validators from link33.
//
Get the validators from link33.
GetValidators
()
(
*
pb
.
Response
,
error
)
GetValidators
()
(
*
pb
.
Response
,
error
)
//Get the current network situation of link33.
//
Get the current network situation of link33.
GetNetworkMeta
()
(
*
pb
.
Response
,
error
)
GetNetworkMeta
()
(
*
pb
.
Response
,
error
)
//Get account balance from link33 by address.
//
Get account balance from link33 by address.
GetAccountBalance
(
address
string
)
(
*
pb
.
Response
,
error
)
GetAccountBalance
(
address
string
)
(
*
pb
.
Response
,
error
)
//Get the missing block header from link33.
//
Get the missing block header from link33.
GetBlockHeader
(
ctx
context
.
Context
,
begin
,
end
uint64
,
ch
chan
<-
*
pb
.
BlockHeader
)
error
GetBlockHeader
(
ctx
context
.
Context
,
begin
,
end
uint64
,
ch
chan
<-
*
pb
.
BlockHeader
)
error
//Get the missing block header from link33.
//
Get the missing block header from link33.
GetInterchainTxWrappers
(
ctx
context
.
Context
,
pid
string
,
begin
,
end
uint64
,
ch
chan
<-
*
pb
.
InterchainTxWrappers
)
error
GetInterchainTxWrappers
(
ctx
context
.
Context
,
pid
string
,
begin
,
end
uint64
,
ch
chan
<-
*
pb
.
InterchainTxWrappers
)
error
//Subscribe to event notifications from link33.
//
Subscribe to event notifications from link33.
Subscribe
(
context
.
Context
,
pb
.
SubscriptionRequest_Type
,
[]
byte
)
(
<-
chan
interface
{},
error
)
Subscribe
(
context
.
Context
,
pb
.
SubscriptionRequest_Type
,
[]
byte
)
(
<-
chan
interface
{},
error
)
//Deploy the contract, the contract address will be returned when the deployment is successful.
//
Deploy the contract, the contract address will be returned when the deployment is successful.
DeployContract
(
contract
[]
byte
,
opts
*
TransactOpts
)
(
contractAddr
*
types
.
Address
,
err
error
)
DeployContract
(
contract
[]
byte
,
opts
*
TransactOpts
)
(
contractAddr
*
types
.
Address
,
err
error
)
//GenerateContractTx generates signed transaction to invoke contract
//
GenerateContractTx generates signed transaction to invoke contract
GenerateContractTx
(
vmType
pb
.
TransactionData_VMType
,
address
*
types
.
Address
,
method
string
,
args
...*
pb
.
Arg
)
(
*
pb
.
BxhTransaction
,
error
)
GenerateContractTx
(
vmType
pb
.
TransactionData_VMType
,
address
*
types
.
Address
,
method
string
,
args
...*
pb
.
Arg
)
(
*
pb
.
BxhTransaction
,
error
)
// GenerateIBTPTx generates interchain tx with ibtp specified
// GenerateIBTPTx generates interchain tx with ibtp specified
GenerateIBTPTx
(
ibtp
*
pb
.
IBTP
)
(
*
pb
.
BxhTransaction
,
error
)
GenerateIBTPTx
(
ibtp
*
pb
.
IBTP
)
(
*
pb
.
BxhTransaction
,
error
)
//Call the contract according to the contract type, contract address,
//
Call the contract according to the contract type, contract address,
//contract method, and contract method parameters
//
contract method, and contract method parameters
InvokeContract
(
vmType
pb
.
TransactionData_VMType
,
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
InvokeContract
(
vmType
pb
.
TransactionData_VMType
,
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
//Invoke the BVM contract, BVM is link33's blot contract.
//
Invoke the BVM contract, BVM is link33's blot contract.
InvokeBVMContract
(
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
InvokeBVMContract
(
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
//Invoke the XVM contract, XVM is WebAssembly contract.
//
Invoke the XVM contract, XVM is WebAssembly contract.
InvokeXVMContract
(
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
InvokeXVMContract
(
address
*
types
.
Address
,
method
string
,
opts
*
TransactOpts
,
args
...*
pb
.
Arg
)
(
*
pb
.
Receipt
,
error
)
// Get link33's signatures specified by id and type.
// Get link33's signatures specified by id and type.
...
@@ -112,13 +112,13 @@ type Client interface {
...
@@ -112,13 +112,13 @@ type Client interface {
// IPFSGetToLocal gets from ipfs and saves to local file path
// IPFSGetToLocal gets from ipfs and saves to local file path
IPFSGetToLocal
(
path
string
,
localfPath
string
)
(
*
pb
.
Response
,
error
)
IPFSGetToLocal
(
path
string
,
localfPath
string
)
(
*
pb
.
Response
,
error
)
//Check whethe there is a master sidecar connect to the link33.
//
Check whethe there is a master sidecar connect to the link33.
CheckMasterSidecar
(
address
string
)
(
*
pb
.
Response
,
error
)
CheckMasterSidecar
(
address
string
)
(
*
pb
.
Response
,
error
)
//Set the master sidecar connect to the link33.
//
Set the master sidecar connect to the link33.
SetMasterSidecar
(
address
string
,
index
string
,
timeout
int64
)
(
*
pb
.
Response
,
error
)
SetMasterSidecar
(
address
string
,
index
string
,
timeout
int64
)
(
*
pb
.
Response
,
error
)
//Update the master sidecar status
//
Update the master sidecar status
HeartBeat
(
address
string
,
index
string
)
(
*
pb
.
Response
,
error
)
HeartBeat
(
address
string
,
index
string
)
(
*
pb
.
Response
,
error
)
}
}
...
...
hub/client/types.go
View file @
27e44da6
...
@@ -33,6 +33,7 @@ func Bytes(content []byte) *pb.Arg {
...
@@ -33,6 +33,7 @@ func Bytes(content []byte) *pb.Arg {
func
Bool
(
b
bool
)
*
pb
.
Arg
{
func
Bool
(
b
bool
)
*
pb
.
Arg
{
return
generateArg
(
pb
.
Arg_Bool
,
[]
byte
(
fmt
.
Sprintf
(
"%v"
,
b
)))
return
generateArg
(
pb
.
Arg_Bool
,
[]
byte
(
fmt
.
Sprintf
(
"%v"
,
b
)))
}
}
func
generateArg
(
typ
pb
.
Arg_Type
,
content
[]
byte
)
*
pb
.
Arg
{
func
generateArg
(
typ
pb
.
Arg_Type
,
content
[]
byte
)
*
pb
.
Arg
{
return
&
pb
.
Arg
{
return
&
pb
.
Arg
{
Type
:
typ
,
Type
:
typ
,
...
...
internal/app/sidecar.go
View file @
27e44da6
...
@@ -49,9 +49,9 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
...
@@ -49,9 +49,9 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
nodePrivKey
,
err
:=
repo
.
LoadNodePrivateKey
(
repoRoot
)
nodePrivKey
,
err
:=
repo
.
LoadNodePrivateKey
(
repoRoot
)
tool
.
Asset
(
err
)
tool
.
Asset
(
err
)
var
(
var
(
//ck checker.Checker
//
ck checker.Checker
//cryptor txcrypto.Cryptor
//
cryptor txcrypto.Cryptor
//apiServer *apiServer.Server
//
apiServer *apiServer.Server
)
)
r
:=
router
.
NewRouter
(
loggers
.
Logger
(
loggers
.
Router
))
r
:=
router
.
NewRouter
(
loggers
.
Logger
(
loggers
.
Router
))
pm
,
err
:=
peermgr
.
New
(
config
,
r
,
nodePrivKey
,
privateKey
,
1
,
loggers
.
Logger
(
loggers
.
PeerMgr
))
pm
,
err
:=
peermgr
.
New
(
config
,
r
,
nodePrivKey
,
privateKey
,
1
,
loggers
.
Logger
(
loggers
.
PeerMgr
))
...
...
internal/appchain/appchain.go
View file @
27e44da6
...
@@ -258,7 +258,7 @@ func (a *appChain) ListenIBTP() <-chan *pb.IBTP {
...
@@ -258,7 +258,7 @@ func (a *appChain) ListenIBTP() <-chan *pb.IBTP {
// QueryIBTP queries interchain tx recorded in appchain given ibtp id
// QueryIBTP queries interchain tx recorded in appchain given ibtp id
func
(
a
*
appChain
)
QueryIBTP
(
to
string
,
id
string
)
(
*
pb
.
IBTP
,
error
)
{
func
(
a
*
appChain
)
QueryIBTP
(
to
string
,
id
string
)
(
*
pb
.
IBTP
,
error
)
{
//func (a *appChain) QueryIBTP(id string) (*pb.IBTP, error) {
//
func (a *appChain) QueryIBTP(id string) (*pb.IBTP, error) {
// TODO(xcc): Encapsulate as a function
// TODO(xcc): Encapsulate as a function
args
:=
strings
.
Split
(
id
,
"-"
)
args
:=
strings
.
Split
(
id
,
"-"
)
if
len
(
args
)
!=
3
{
if
len
(
args
)
!=
3
{
...
...
internal/appchain/monitor.go
View file @
27e44da6
...
@@ -7,7 +7,7 @@ type Monitor interface {
...
@@ -7,7 +7,7 @@ type Monitor interface {
// listen on interchain ibtp from appchain
// listen on interchain ibtp from appchain
ListenIBTP
()
<-
chan
*
pb
.
IBTP
ListenIBTP
()
<-
chan
*
pb
.
IBTP
// query historical ibtp by its id
// query historical ibtp by its id
//QueryIBTP(id string) (*pb.IBTP, error)
//
QueryIBTP(id string) (*pb.IBTP, error)
QueryIBTP
(
to
string
,
id
string
)
(
*
pb
.
IBTP
,
error
)
QueryIBTP
(
to
string
,
id
string
)
(
*
pb
.
IBTP
,
error
)
// QueryLatestMeta queries latest index map of ibtps threw on appchain
// QueryLatestMeta queries latest index map of ibtps threw on appchain
QueryOuterMeta
()
map
[
string
]
uint64
QueryOuterMeta
()
map
[
string
]
uint64
...
...
internal/appchain/port.go
View file @
27e44da6
...
@@ -14,7 +14,7 @@ func (a *appChain) Type() string {
...
@@ -14,7 +14,7 @@ func (a *appChain) Type() string {
return
a
.
client
.
Type
()
return
a
.
client
.
Type
()
}
}
//TODO appchain
//
TODO appchain
func
(
a
*
appChain
)
Tag
()
string
{
func
(
a
*
appChain
)
Tag
()
string
{
return
a
.
client
.
Type
()
return
a
.
client
.
Type
()
}
}
...
@@ -25,9 +25,9 @@ func (a *appChain) Name() string {
...
@@ -25,9 +25,9 @@ func (a *appChain) Name() string {
// Send 接收的数据只能是IBTPX相关的结构,以及查询完成,需要同步返回的数据
// Send 接收的数据只能是IBTPX相关的结构,以及查询完成,需要同步返回的数据
func
(
a
*
appChain
)
Send
(
msg
*
pb
.
Message
)
(
*
pb
.
Message
,
error
)
{
func
(
a
*
appChain
)
Send
(
msg
*
pb
.
Message
)
(
*
pb
.
Message
,
error
)
{
//TODO 调用该执行。
//
TODO 调用该执行。
//a.ExecuteIBTP()
//
a.ExecuteIBTP()
//a.Rollback()
//
a.Rollback()
t
:=
msg
.
Type
t
:=
msg
.
Type
switch
{
switch
{
case
t
==
pb
.
Message_IBTP_SEND
:
case
t
==
pb
.
Message_IBTP_SEND
:
...
@@ -41,7 +41,7 @@ func (a *appChain) Send(msg *pb.Message) (*pb.Message, error) {
...
@@ -41,7 +41,7 @@ func (a *appChain) Send(msg *pb.Message) (*pb.Message, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
if
ibtp
==
nil
{
//TODO
if
ibtp
==
nil
{
//
TODO
return
nil
,
errors
.
New
(
"ibtp wrong"
)
return
nil
,
errors
.
New
(
"ibtp wrong"
)
}
}
if
ibtp
.
Type
==
pb
.
IBTP_RECEIPT_FAILURE
||
pb
.
IBTP_RECEIPT_SUCCESS
==
ibtp
.
Type
{
if
ibtp
.
Type
==
pb
.
IBTP_RECEIPT_FAILURE
||
pb
.
IBTP_RECEIPT_SUCCESS
==
ibtp
.
Type
{
...
@@ -70,9 +70,9 @@ func (a *appChain) Send(msg *pb.Message) (*pb.Message, error) {
...
@@ -70,9 +70,9 @@ func (a *appChain) Send(msg *pb.Message) (*pb.Message, error) {
}
}
func
(
a
*
appChain
)
AsyncSend
(
msg
*
pb
.
Message
)
error
{
func
(
a
*
appChain
)
AsyncSend
(
msg
*
pb
.
Message
)
error
{
//TODO 调用该执行。
//
TODO 调用该执行。
//a.ExecuteIBTP()
//
a.ExecuteIBTP()
//a.Rollback()
//
a.Rollback()
panic
(
"implement me"
)
panic
(
"implement me"
)
}
}
...
@@ -84,7 +84,7 @@ func (a *appChain) ListenIBTPX() <-chan *pb.Message {
...
@@ -84,7 +84,7 @@ func (a *appChain) ListenIBTPX() <-chan *pb.Message {
for
{
for
{
select
{
select
{
case
ibtp
:=
<-
ibtpCh
:
case
ibtp
:=
<-
ibtpCh
:
//TODO ibtp to ibtpx
//
TODO ibtp to ibtpx
data
,
_
:=
ibtp
.
Marshal
()
data
,
_
:=
ibtp
.
Marshal
()
msg
:=
pb
.
Msg
(
pb
.
Message_IBTP_SEND
,
true
,
data
)
msg
:=
pb
.
Msg
(
pb
.
Message_IBTP_SEND
,
true
,
data
)
a
.
msgCh
<-
msg
a
.
msgCh
<-
msg
...
...
internal/checker/checker.go
View file @
27e44da6
...
@@ -2,8 +2,7 @@ package checker
...
@@ -2,8 +2,7 @@ package checker
import
"github.com/link33/sidecar/model/pb"
import
"github.com/link33/sidecar/model/pb"
type
MockChecker
struct
{
type
MockChecker
struct
{}
}
func
(
ck
*
MockChecker
)
Check
(
ibtp
*
pb
.
IBTP
)
error
{
func
(
ck
*
MockChecker
)
Check
(
ibtp
*
pb
.
IBTP
)
error
{
return
nil
return
nil
...
...
internal/checker/checker_test.go
View file @
27e44da6
...
@@ -79,8 +79,7 @@ func getIBTP(t *testing.T, index uint64, typ pb.IBTP_Type, fid, tid, proofPath s
...
@@ -79,8 +79,7 @@ func getIBTP(t *testing.T, index uint64, typ pb.IBTP_Type, fid, tid, proofPath s
}
}
// MockAppchainMgr================================================
// MockAppchainMgr================================================
type
MockAppchainMgr
struct
{
type
MockAppchainMgr
struct
{}
}
func
(
m
MockAppchainMgr
)
ChangeStatus
(
id
,
trigger
string
,
extra
[]
byte
)
(
bool
,
[]
byte
)
{
func
(
m
MockAppchainMgr
)
ChangeStatus
(
id
,
trigger
string
,
extra
[]
byte
)
(
bool
,
[]
byte
)
{
return
true
,
nil
return
true
,
nil
...
...
internal/loggers/logger_test.go
View file @
27e44da6
...
@@ -31,10 +31,10 @@ func TestLogger(t *testing.T) {
...
@@ -31,10 +31,10 @@ func TestLogger(t *testing.T) {
},
},
}
}
InitializeLogger
(
config
)
InitializeLogger
(
config
)
api
:=
Logger
(
ApiServer
)
//TODO
api
:=
Logger
(
ApiServer
)
//
TODO
require
.
NotNil
(
t
,
api
)
require
.
NotNil
(
t
,
api
)
//api.Info("-------")
//
api.Info("-------")
//mangerLoggerLevel := w.loggers[Manger].Logger.Level.String()
//
mangerLoggerLevel := w.loggers[Manger].Logger.Level.String()
//t.Log(mangerLoggerLevel)
//
t.Log(mangerLoggerLevel)
//require.Equal(t, config.Log.Module.Manger, mangerLoggerLevel)
//
require.Equal(t, config.Log.Module.Manger, mangerLoggerLevel)
}
}
internal/manger/manager.go
View file @
27e44da6
...
@@ -14,7 +14,7 @@ type Manager struct {
...
@@ -14,7 +14,7 @@ type Manager struct {
logger
logrus
.
FieldLogger
logger
logrus
.
FieldLogger
appchainMgr
appchainmgr
.
AppchainMgr
appchainMgr
appchainmgr
.
AppchainMgr
pm
peermgr
.
PeerManager
pm
peermgr
.
PeerManager
//router router.Router
//
router router.Router
}
}
func
(
mgr
*
Manager
)
Start
()
error
{
func
(
mgr
*
Manager
)
Start
()
error
{
...
...
internal/peermgr/helper.go
View file @
27e44da6
...
@@ -35,7 +35,7 @@ func loadPeers(peers []string, privateKey crypto2.PrivKey) (string, map[string]*
...
@@ -35,7 +35,7 @@ func loadPeers(peers []string, privateKey crypto2.PrivKey) (string, map[string]*
}
}
for
_
,
p
:=
range
peers
{
for
_
,
p
:=
range
peers
{
//p: 127.0.0.1:4567/p2p/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
//
p: 127.0.0.1:4567/p2p/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
if
strings
.
HasSuffix
(
p
,
id
.
String
())
{
if
strings
.
HasSuffix
(
p
,
id
.
String
())
{
idx
:=
strings
.
LastIndex
(
p
,
"/p2p/"
)
idx
:=
strings
.
LastIndex
(
p
,
"/p2p/"
)
if
idx
==
-
1
{
if
idx
==
-
1
{
...
...
internal/peermgr/helper_test.go
View file @
27e44da6
...
@@ -12,9 +12,7 @@ import (
...
@@ -12,9 +12,7 @@ import (
)
)
func
TestLoadPeers
(
t
*
testing
.
T
)
{
func
TestLoadPeers
(
t
*
testing
.
T
)
{
var
(
port
:=
4567
port
=
4567
)
var
peers
[]
string
var
peers
[]
string
var
nodeKeys
[]
crypto
.
PrivateKey
var
nodeKeys
[]
crypto
.
PrivateKey
var
ids
[]
string
var
ids
[]
string
...
...
internal/peermgr/local.go
View file @
27e44da6
...
@@ -59,7 +59,7 @@ func (l *local) Send(msg *pb.Message) (*pb.Message, error) {
...
@@ -59,7 +59,7 @@ func (l *local) Send(msg *pb.Message) (*pb.Message, error) {
return
nil
,
nil
return
nil
,
nil
}
}
//需要异步处理的数据
//
需要异步处理的数据
func
(
l
*
local
)
AsyncSend
(
msg
*
pb
.
Message
)
error
{
func
(
l
*
local
)
AsyncSend
(
msg
*
pb
.
Message
)
error
{
// 先获取消息类型,做出判断是否路由,判断是异步还是同步。
// 先获取消息类型,做出判断是否路由,判断是异步还是同步。
// 然后做出IBTPX消息,对from、to做路由判断,以及同步异步完成。
// 然后做出IBTPX消息,对from、to做路由判断,以及同步异步完成。
...
@@ -71,7 +71,7 @@ func (l *local) AsyncSend(msg *pb.Message) error {
...
@@ -71,7 +71,7 @@ func (l *local) AsyncSend(msg *pb.Message) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
//TODO
//
TODO
if
ibtpx
.
Ibtp
.
GetTo
()
==
l
.
ID
()
{
if
ibtpx
.
Ibtp
.
GetTo
()
==
l
.
ID
()
{
return
errors
.
New
(
"message type error"
)
return
errors
.
New
(
"message type error"
)
}
}
...
@@ -82,7 +82,6 @@ func (l *local) AsyncSend(msg *pb.Message) error {
...
@@ -82,7 +82,6 @@ func (l *local) AsyncSend(msg *pb.Message) error {
// 注册信息
// 注册信息
// 分发节点信息
// 分发节点信息
// 接收与sidecar节点相关的信息流
// 接收与sidecar节点相关的信息流
}
}
return
nil
return
nil
}
}
...
@@ -105,6 +104,6 @@ func (l *local) HandleGetPeerInfoMessage(p port.Port, message *pb.Message) {
...
@@ -105,6 +104,6 @@ func (l *local) HandleGetPeerInfoMessage(p port.Port, message *pb.Message) {
}
}
}
}
//涉及到同步异步的问题。
//
涉及到同步异步的问题。
//一、根据目的地址转发(异步完成);(这种情况其实就是返回一个ack给绑定对应的port dev,还是根据消息类型判断)。
//
一、根据目的地址转发(异步完成);(这种情况其实就是返回一个ack给绑定对应的port dev,还是根据消息类型判断)。
//二、根据消息类型转发(同步情况:需要立马返回结果;异步情况:需要返回一个ack,给绑定对应的port dev,所以找到对应的port dev 很关键!)。
//
二、根据消息类型转发(同步情况:需要立马返回结果;异步情况:需要返回一个ack,给绑定对应的port dev,所以找到对应的port dev 很关键!)。
internal/peermgr/peermgr.go
View file @
27e44da6
...
@@ -7,8 +7,10 @@ import (
...
@@ -7,8 +7,10 @@ import (
"github.com/link33/sidecar/model/pb"
"github.com/link33/sidecar/model/pb"
)
)
type
MessageHandler
func
(
port
.
Port
,
*
pb
.
Message
)
type
(
type
ConnectHandler
func
(
string
)
MessageHandler
func
(
port
.
Port
,
*
pb
.
Message
)
ConnectHandler
func
(
string
)
)
//go:generate mockgen -destination mock_peermgr/mock_peermgr.go -package mock_peermgr -source peermgr.go
//go:generate mockgen -destination mock_peermgr/mock_peermgr.go -package mock_peermgr -source peermgr.go
type
PeerManager
interface
{
type
PeerManager
interface
{
...
...
internal/peermgr/peermgr_test.go
View file @
27e44da6
...
@@ -228,6 +228,7 @@ func prepare(t *testing.T) (*Swarm, []string, *Swarm, *pb.Message, string, strin
...
@@ -228,6 +228,7 @@ func prepare(t *testing.T) (*Swarm, []string, *Swarm, *pb.Message, string, strin
return
swarm
,
ids
,
mockSwarm
,
mockMsg
,
mockMultiAddr
,
mockId
return
swarm
,
ids
,
mockSwarm
,
mockMsg
,
mockMultiAddr
,
mockId
}
}
func
genKeysAndConfig
(
t
*
testing
.
T
,
peerCnt
int
,
mode
string
)
([]
crypto
.
PrivateKey
,
[]
crypto
.
PrivateKey
,
*
repo
.
Config
,
[]
string
)
{
func
genKeysAndConfig
(
t
*
testing
.
T
,
peerCnt
int
,
mode
string
)
([]
crypto
.
PrivateKey
,
[]
crypto
.
PrivateKey
,
*
repo
.
Config
,
[]
string
)
{
var
nodeKeys
[]
crypto
.
PrivateKey
var
nodeKeys
[]
crypto
.
PrivateKey
var
privKeys
[]
crypto
.
PrivateKey
var
privKeys
[]
crypto
.
PrivateKey
...
@@ -267,8 +268,7 @@ func genKeysAndConfig(t *testing.T, peerCnt int, mode string) ([]crypto.PrivateK
...
@@ -267,8 +268,7 @@ func genKeysAndConfig(t *testing.T, peerCnt int, mode string) ([]crypto.PrivateK
}
}
//=======================================================================
//=======================================================================
type
MockStream
struct
{
type
MockStream
struct
{}
}
func
(
ms
*
MockStream
)
RemotePeerID
()
string
{
func
(
ms
*
MockStream
)
RemotePeerID
()
string
{
return
""
return
""
...
@@ -317,8 +317,7 @@ func (ms *MockStream) Read(time.Duration) ([]byte, error) {
...
@@ -317,8 +317,7 @@ func (ms *MockStream) Read(time.Duration) ([]byte, error) {
}
}
//=======================================================================
//=======================================================================
type
MockStreamHandler
struct
{
type
MockStreamHandler
struct
{}
}
// get peer new stream true:reusable stream false:non reusable stream
// get peer new stream true:reusable stream false:non reusable stream
func
(
msh
*
MockStreamHandler
)
GetStream
(
string
,
bool
)
(
network
.
Stream
,
error
)
{
func
(
msh
*
MockStreamHandler
)
GetStream
(
string
,
bool
)
(
network
.
Stream
,
error
)
{
...
@@ -327,12 +326,10 @@ func (msh *MockStreamHandler) GetStream(string, bool) (network.Stream, error) {
...
@@ -327,12 +326,10 @@ func (msh *MockStreamHandler) GetStream(string, bool) (network.Stream, error) {
// release stream
// release stream
func
(
msh
*
MockStreamHandler
)
ReleaseStream
(
network
.
Stream
)
{
func
(
msh
*
MockStreamHandler
)
ReleaseStream
(
network
.
Stream
)
{
}
}
//=======================================================================
//=======================================================================
type
MockPeerHandler
struct
{
type
MockPeerHandler
struct
{}
}
// get local peer id
// get local peer id
func
(
mph
*
MockPeerHandler
)
PeerID
()
string
{
func
(
mph
*
MockPeerHandler
)
PeerID
()
string
{
...
@@ -380,8 +377,7 @@ func (mph *MockPeerHandler) GetRemotePubKey(id peer2.ID) (libp2pcry.PubKey, erro
...
@@ -380,8 +377,7 @@ func (mph *MockPeerHandler) GetRemotePubKey(id peer2.ID) (libp2pcry.PubKey, erro
}
}
//=======================================================================
//=======================================================================
type
MockDHTHandler
struct
{
type
MockDHTHandler
struct
{}
}
// searches for a peer with peer id
// searches for a peer with peer id
func
(
mdhth
*
MockDHTHandler
)
FindPeer
(
string
)
(
peer2
.
AddrInfo
,
error
)
{
func
(
mdhth
*
MockDHTHandler
)
FindPeer
(
string
)
(
peer2
.
AddrInfo
,
error
)
{
...
@@ -455,12 +451,10 @@ func (mn *MockNetwork) Disconnect(string) error {
...
@@ -455,12 +451,10 @@ func (mn *MockNetwork) Disconnect(string) error {
// SetConnectionCallback sets the callback after connecting
// SetConnectionCallback sets the callback after connecting
func
(
mn
*
MockNetwork
)
SetConnectCallback
(
network
.
ConnectCallback
)
{
func
(
mn
*
MockNetwork
)
SetConnectCallback
(
network
.
ConnectCallback
)
{
}
}
// SetMessageHandler sets message handler
// SetMessageHandler sets message handler
func
(
mn
*
MockNetwork
)
SetMessageHandler
(
network
.
MessageHandler
)
{
func
(
mn
*
MockNetwork
)
SetMessageHandler
(
network
.
MessageHandler
)
{
}
}
// AsyncSend sends message to peer with peer id.
// AsyncSend sends message to peer with peer id.
...
...
internal/peermgr/swarm.go
View file @
27e44da6
...
@@ -61,7 +61,7 @@ func New(config *repo.Config, router router.Router, nodePrivKey crypto.PrivateKe
...
@@ -61,7 +61,7 @@ func New(config *repo.Config, router router.Router, nodePrivKey crypto.PrivateKe
return
nil
,
fmt
.
Errorf
(
"load peers: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"load peers: %w"
,
err
)
}
}
var
protocolIDs
=
[]
string
{
protocolID
}
protocolIDs
:
=
[]
string
{
protocolID
}
p2p
,
err
:=
network
.
New
(
p2p
,
err
:=
network
.
New
(
network
.
WithLocalAddr
(
ll
),
network
.
WithLocalAddr
(
ll
),
network
.
WithPrivateKey
(
libp2pPrivKey
),
network
.
WithPrivateKey
(
libp2pPrivKey
),
...
@@ -125,7 +125,7 @@ func (swarm *Swarm) Start() error {
...
@@ -125,7 +125,7 @@ func (swarm *Swarm) Start() error {
return
fmt
.
Errorf
(
"p2p module start: %w"
,
err
)
return
fmt
.
Errorf
(
"p2p module start: %w"
,
err
)
}
}
//need to connect one other sidecar at least
//
need to connect one other sidecar at least
wg
:=
&
sync
.
WaitGroup
{}
wg
:=
&
sync
.
WaitGroup
{}
wg
.
Add
(
1
)
wg
.
Add
(
1
)
...
@@ -224,7 +224,7 @@ func (swarm *Swarm) HandleIBTPX(pt port.Port, m *pb.Message) {
...
@@ -224,7 +224,7 @@ func (swarm *Swarm) HandleIBTPX(pt port.Port, m *pb.Message) {
if
is
{
if
is
{
ps
,
iss
:=
p
.
(
*
sidecar
)
ps
,
iss
:=
p
.
(
*
sidecar
)
if
iss
{
if
iss
{
//ps.rev <- m
//
ps.rev <- m
ps
.
Receive
(
m
)
ps
.
Receive
(
m
)
}
}
}
else
{
}
else
{
...
@@ -360,8 +360,10 @@ func (swarm *Swarm) FindProviders(id string) (string, error) {
...
@@ -360,8 +360,10 @@ func (swarm *Swarm) FindProviders(id string) (string, error) {
sidecarId
,
err
:=
swarm
.
Connect
(
&
provider
)
sidecarId
,
err
:=
swarm
.
Connect
(
&
provider
)
if
err
!=
nil
{
if
err
!=
nil
{
swarm
.
logger
.
WithFields
(
logrus
.
Fields
{
"peerId"
:
sidecarId
,
swarm
.
logger
.
WithFields
(
logrus
.
Fields
{
"cid"
:
provider
.
ID
.
String
()})
.
Error
(
"connect error: "
,
err
)
"peerId"
:
sidecarId
,
"cid"
:
provider
.
ID
.
String
(),
})
.
Error
(
"connect error: "
,
err
)
continue
continue
}
}
return
sidecarId
,
nil
return
sidecarId
,
nil
...
...
internal/port/const.go
View file @
27e44da6
...
@@ -4,8 +4,8 @@ package port
...
@@ -4,8 +4,8 @@ package port
type
Type
int
type
Type
int
const
(
const
(
Hub
=
"hub"
//Hub: 同步数据,同步元数据等。
Hub
=
"hub"
//
Hub: 同步数据,同步元数据等。
Sidecar
=
"sidecar"
//SideCar节点
Sidecar
=
"sidecar"
//
SideCar节点
Appchain
=
"appchain"
//区块链客户端
Appchain
=
"appchain"
//
区块链客户端
Local
=
"local"
Local
=
"local"
)
)
internal/port/map.go
View file @
27e44da6
...
@@ -5,9 +5,9 @@ import (
...
@@ -5,9 +5,9 @@ import (
"sync"
"sync"
)
)
//获取唯一hub
//
获取唯一hub
//根据类型获取port
//
根据类型获取port
//根据ID获取
//
根据ID获取
type
PortMap
struct
{
type
PortMap
struct
{
rw
sync
.
RWMutex
rw
sync
.
RWMutex
peerPort
map
[
string
]
Port
peerPort
map
[
string
]
Port
...
...
internal/repo/config.go
View file @
27e44da6
...
@@ -10,9 +10,9 @@ import (
...
@@ -10,9 +10,9 @@ import (
)
)
const
(
const
(
DirectMode
=
"direct"
//直连模式
DirectMode
=
"direct"
//
直连模式
RelayMode
=
"relay"
//
RelayMode
=
"relay"
//
UnionMode
=
"union"
//联盟模式,中继架构。代表的是部署架构,不够灵活。不能随时变动。
UnionMode
=
"union"
//
联盟模式,中继架构。代表的是部署架构,不够灵活。不能随时变动。
)
)
// Config represents the necessary config data for starting sidecar
// Config represents the necessary config data for starting sidecar
...
...
internal/repo/repo.go
View file @
27e44da6
...
@@ -57,7 +57,7 @@ var RootPath string
...
@@ -57,7 +57,7 @@ var RootPath string
// account file and so on.
// account file and so on.
func
Initialize
(
repoRoot
string
)
error
{
func
Initialize
(
repoRoot
string
)
error
{
if
_
,
err
:=
os
.
Stat
(
repoRoot
);
os
.
IsNotExist
(
err
)
{
if
_
,
err
:=
os
.
Stat
(
repoRoot
);
os
.
IsNotExist
(
err
)
{
err
:=
os
.
MkdirAll
(
repoRoot
,
0755
)
err
:=
os
.
MkdirAll
(
repoRoot
,
0
o
755
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -83,12 +83,12 @@ func Initialize(repoRoot string) error {
...
@@ -83,12 +83,12 @@ func Initialize(repoRoot string) error {
p
:=
filepath
.
Join
(
repoRoot
,
s
)
p
:=
filepath
.
Join
(
repoRoot
,
s
)
dir
:=
filepath
.
Dir
(
p
)
dir
:=
filepath
.
Dir
(
p
)
if
_
,
err
:=
os
.
Stat
(
dir
);
os
.
IsNotExist
(
err
)
{
if
_
,
err
:=
os
.
Stat
(
dir
);
os
.
IsNotExist
(
err
)
{
err
:=
os
.
MkdirAll
(
dir
,
0755
)
err
:=
os
.
MkdirAll
(
dir
,
0
o
755
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
}
}
return
ioutil
.
WriteFile
(
p
,
[]
byte
(
file
.
String
()),
0644
)
return
ioutil
.
WriteFile
(
p
,
[]
byte
(
file
.
String
()),
0
o
644
)
});
err
!=
nil
{
});
err
!=
nil
{
return
err
return
err
}
}
...
...
internal/router/interface.go
View file @
27e44da6
...
@@ -18,26 +18,26 @@ type Router interface {
...
@@ -18,26 +18,26 @@ type Router interface {
Load
(
key
string
)
(
value
port
.
Port
,
ok
bool
)
Load
(
key
string
)
(
value
port
.
Port
,
ok
bool
)
//InPut(ibtp *pb.IBTP) chan *pb.IBTP
//
InPut(ibtp *pb.IBTP) chan *pb.IBTP
//OutPut(ibtp *pb.IBTP) chan *pb.IBTP
//
OutPut(ibtp *pb.IBTP) chan *pb.IBTP
//代替上面两个方法
//
代替上面两个方法
//Router(ibtp *pb.IBTP) chan *pb.IBTP
//
Router(ibtp *pb.IBTP) chan *pb.IBTP
}
}
//路由规则,根据路由表,rules接口, 这个放到交易内部。可以让用户决定。并且签名。
//
路由规则,根据路由表,rules接口, 这个放到交易内部。可以让用户决定。并且签名。
// 1、广播
// 1、广播
// 2、单一路由,指定路由标识。
// 2、单一路由,指定路由标识。
// 3、p2p模式的路由,
// 3、p2p模式的路由,
// 4、中继路由
// 4、中继路由
// 5、定制化:
// 5、定制化:
//验证规则
//
验证规则
//1、收集多个节点
//
1、收集多个节点
//2、收集指定节点
//
2、收集指定节点
//3、收集共识节点
//
3、收集共识节点
// 即满足多个条件
// 即满足多个条件
//路由规则优先级:
//
路由规则优先级:
//1、用户交易内部的路由规则最高。
//
1、用户交易内部的路由规则最高。
//2、用户在程序设定。
//
2、用户在程序设定。
//3、系统默认。
//
3、系统默认。
internal/router/router.go
View file @
27e44da6
...
@@ -47,7 +47,7 @@ func (r *router) Stop() error {
...
@@ -47,7 +47,7 @@ func (r *router) Stop() error {
return
nil
return
nil
}
}
//TODO
//
TODO
func
(
r
*
router
)
Add
(
p
port
.
Port
)
error
{
func
(
r
*
router
)
Add
(
p
port
.
Port
)
error
{
r
.
portMap
.
Add
(
p
)
r
.
portMap
.
Add
(
p
)
go
func
()
{
go
func
()
{
...
@@ -88,12 +88,13 @@ func (r *router) Adds(p []port.Port) error {
...
@@ -88,12 +88,13 @@ func (r *router) Adds(p []port.Port) error {
func
(
r
*
router
)
Load
(
key
string
)
(
value
port
.
Port
,
ok
bool
)
{
func
(
r
*
router
)
Load
(
key
string
)
(
value
port
.
Port
,
ok
bool
)
{
return
r
.
portMap
.
Load
(
key
)
return
r
.
portMap
.
Load
(
key
)
}
}
func
(
r
*
router
)
Remove
(
p
port
.
Port
)
error
{
func
(
r
*
router
)
Remove
(
p
port
.
Port
)
error
{
r
.
portMap
.
Remove
(
p
)
r
.
portMap
.
Remove
(
p
)
return
nil
return
nil
}
}
//路由的有那些数据?需要区分!!!
//
路由的有那些数据?需要区分!!!
func
(
r
*
router
)
Route
(
msg
*
pb
.
Message
)
error
{
func
(
r
*
router
)
Route
(
msg
*
pb
.
Message
)
error
{
if
msg
==
nil
{
if
msg
==
nil
{
r
.
logger
.
Error
(
"msg = nil"
)
r
.
logger
.
Error
(
"msg = nil"
)
...
@@ -106,7 +107,7 @@ func (r *router) Route(msg *pb.Message) error {
...
@@ -106,7 +107,7 @@ func (r *router) Route(msg *pb.Message) error {
if
!
r
.
isRouter
(
ibtpx
)
{
if
!
r
.
isRouter
(
ibtpx
)
{
return
nil
return
nil
}
}
//本网关签名
//
本网关签名
if
!
r
.
isSign
(
ibtpx
)
{
if
!
r
.
isSign
(
ibtpx
)
{
r
.
sign
(
ibtpx
)
r
.
sign
(
ibtpx
)
}
}
...
@@ -157,10 +158,10 @@ func (r *router) Route(msg *pb.Message) error {
...
@@ -157,10 +158,10 @@ func (r *router) Route(msg *pb.Message) error {
}
}
switch
{
switch
{
case
pp
.
Type
()
==
port
.
Sidecar
:
case
pp
.
Type
()
==
port
.
Sidecar
:
return
pp
.
AsyncSend
(
msg
)
//转发给其它的sidecar节点或者本身local节点。
return
pp
.
AsyncSend
(
msg
)
//
转发给其它的sidecar节点或者本身local节点。
case
pp
.
Type
()
==
port
.
Hub
:
//发给hub appchain TODO 本机找到的appchain只能是自己的appchain
case
pp
.
Type
()
==
port
.
Hub
:
//
发给hub appchain TODO 本机找到的appchain只能是自己的appchain
return
pp
.
AsyncSend
(
msg
)
return
pp
.
AsyncSend
(
msg
)
case
pp
.
Type
()
==
port
.
Appchain
:
//TODO 本机找到的appchain只能是自己的appchain
case
pp
.
Type
()
==
port
.
Appchain
:
//
TODO 本机找到的appchain只能是自己的appchain
switch
msg
.
Type
{
switch
msg
.
Type
{
case
pb
.
Message_IBTP_SEND
:
case
pb
.
Message_IBTP_SEND
:
ret
,
err
:=
send
()
ret
,
err
:=
send
()
...
@@ -168,9 +169,9 @@ func (r *router) Route(msg *pb.Message) error {
...
@@ -168,9 +169,9 @@ func (r *router) Route(msg *pb.Message) error {
r
.
logger
.
Error
(
err
)
r
.
logger
.
Error
(
err
)
return
err
return
err
}
}
return
r
.
Route
(
ret
)
//返回值,重新路由; send返回值需要调换from , to;
return
r
.
Route
(
ret
)
//
返回值,重新路由; send返回值需要调换from , to;
//d,_ := ret.Marshal()
//
d,_ := ret.Marshal()
//msg = pb.Msg(pb.Message_IBTP_RECEIPT_SEND,true,d)
//
msg = pb.Msg(pb.Message_IBTP_RECEIPT_SEND,true,d)
case
pb
.
Message_IBTP_RECEIPT_SEND
:
case
pb
.
Message_IBTP_RECEIPT_SEND
:
err
=
asyncSend
()
err
=
asyncSend
()
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -188,7 +189,7 @@ func (r *router) Route(msg *pb.Message) error {
...
@@ -188,7 +189,7 @@ func (r *router) Route(msg *pb.Message) error {
return
nil
return
nil
}
}
}
}
//规则判断 转发给其它的sidecar节点
//
规则判断 转发给其它的sidecar节点
method
:=
strings
.
ToLower
(
ibtpx
.
RouteMethod
)
method
:=
strings
.
ToLower
(
ibtpx
.
RouteMethod
)
if
md
,
is
:=
r
.
methodMap
[
method
];
is
{
if
md
,
is
:=
r
.
methodMap
[
method
];
is
{
ports
:=
md
(
ibtpx
.
RouteMethodArg
)
ports
:=
md
(
ibtpx
.
RouteMethodArg
)
...
@@ -206,14 +207,14 @@ func (r *router) Route(msg *pb.Message) error {
...
@@ -206,14 +207,14 @@ func (r *router) Route(msg *pb.Message) error {
func
(
r
*
router
)
isRouter
(
ibtpx
*
pb
.
IBTPX
)
bool
{
func
(
r
*
router
)
isRouter
(
ibtpx
*
pb
.
IBTPX
)
bool
{
mode
:=
ibtpx
.
Mode
mode
:=
ibtpx
.
Mode
//本网关已签名、中继链已背书、to是本网关内部的appchain,即顺利通过并转发,否则打断。
//
本网关已签名、中继链已背书、to是本网关内部的appchain,即顺利通过并转发,否则打断。
if
!
((
r
.
isSign
(
ibtpx
)
&&
mode
==
repo
.
RelayMode
&&
r
.
isEndorse
(
ibtpx
))
||
!
r
.
isSign
(
ibtpx
))
{
if
!
((
r
.
isSign
(
ibtpx
)
&&
mode
==
repo
.
RelayMode
&&
r
.
isEndorse
(
ibtpx
))
||
!
r
.
isSign
(
ibtpx
))
{
return
false
return
false
}
}
return
true
return
true
}
}
//TODO
//
TODO
func
(
r
*
router
)
firstRoute
(
msg
*
pb
.
Message
)
{
func
(
r
*
router
)
firstRoute
(
msg
*
pb
.
Message
)
{
p
:=
r
.
portMap
.
RandRouterPort
()
p
:=
r
.
portMap
.
RandRouterPort
()
_
=
p
.
AsyncSend
(
msg
)
_
=
p
.
AsyncSend
(
msg
)
...
...
internal/syncer/interface.go
View file @
27e44da6
...
@@ -31,31 +31,31 @@ type Syncer interface {
...
@@ -31,31 +31,31 @@ type Syncer interface {
// if error occurs, user need to reconstruct this ibtp cause it means ibtp is invalid on bitxhub
// if error occurs, user need to reconstruct this ibtp cause it means ibtp is invalid on bitxhub
SendIBTP
(
ibtp
*
pb
.
IBTP
)
error
SendIBTP
(
ibtp
*
pb
.
IBTP
)
error
//GetAppchains gets appchains from bitxhub node
//
GetAppchains gets appchains from bitxhub node
//GetAppchains() ([]*appchainmgr.Appchain, error)
//
GetAppchains() ([]*appchainmgr.Appchain, error)
////GetInterchainById gets interchain meta by appchain id
////GetInterchainById gets interchain meta by appchain id
//GetInterchainById(from string) *pb.Interchain
//GetInterchainById(from string) *pb.Interchain
// RegisterRecoverHandler registers handler that recover ibtps from bitxhub
// RegisterRecoverHandler registers handler that recover ibtps from bitxhub
//RegisterRecoverHandler(RecoverUnionHandler) error
//
RegisterRecoverHandler(RecoverUnionHandler) error
// RegisterAppchainHandler registers handler that fetch appchains information
// RegisterAppchainHandler registers handler that fetch appchains information
//RegisterAppchainHandler(handler AppchainHandler) error
//
RegisterAppchainHandler(handler AppchainHandler) error
RegisterRollbackHandler
(
handler
RollbackHandler
)
error
RegisterRollbackHandler
(
handler
RollbackHandler
)
error
}
}
type
Handler
interface
{
type
Handler
interface
{
//GetAppchains gets appchains from bitxhub node
//
GetAppchains gets appchains from bitxhub node
GetAppchains
()
([]
*
appchainmgr
.
Appchain
,
error
)
GetAppchains
()
([]
*
appchainmgr
.
Appchain
,
error
)
//GetInterchainById gets interchain meta by appchain id
//
GetInterchainById gets interchain meta by appchain id
GetInterchainById
(
from
string
)
*
pb
.
Interchain
GetInterchainById
(
from
string
)
*
pb
.
Interchain
//RegisterRecoverHandler registers handler that recover ibtps from bitxhub
//
RegisterRecoverHandler registers handler that recover ibtps from bitxhub
RegisterRecoverHandler
(
RecoverUnionHandler
)
error
RegisterRecoverHandler
(
RecoverUnionHandler
)
error
//RegisterAppchainHandler registers handler that fetch appchains information
//
RegisterAppchainHandler registers handler that fetch appchains information
RegisterAppchainHandler
(
handler
AppchainHandler
)
error
RegisterAppchainHandler
(
handler
AppchainHandler
)
error
}
}
internal/syncer/syncer.go
View file @
27e44da6
...
@@ -156,16 +156,15 @@ func (syncer *WrapperSyncer) syncInterchainTxWrappers() {
...
@@ -156,16 +156,15 @@ func (syncer *WrapperSyncer) syncInterchainTxWrappers() {
return
return
}
}
}
}
}
}
//持续监听事件,
//
持续监听事件,
for
{
for
{
select
{
select
{
case
<-
syncer
.
ctx
.
Done
()
:
case
<-
syncer
.
ctx
.
Done
()
:
return
return
default
:
default
:
//开启监听
//
开启监听
ch
:=
syncer
.
getWrappersChannel
()
ch
:=
syncer
.
getWrappersChannel
()
err
:=
retry
.
Retry
(
func
(
attempt
uint
)
error
{
err
:=
retry
.
Retry
(
func
(
attempt
uint
)
error
{
...
@@ -181,7 +180,6 @@ func (syncer *WrapperSyncer) syncInterchainTxWrappers() {
...
@@ -181,7 +180,6 @@ func (syncer *WrapperSyncer) syncInterchainTxWrappers() {
return
nil
return
nil
},
strategy
.
Wait
(
1
*
time
.
Second
))
},
strategy
.
Wait
(
1
*
time
.
Second
))
if
err
!=
nil
{
if
err
!=
nil
{
syncer
.
logger
.
Panic
(
err
)
syncer
.
logger
.
Panic
(
err
)
}
}
...
@@ -220,7 +218,7 @@ func (syncer *WrapperSyncer) getWrappersChannel() chan *pb.InterchainTxWrappers
...
@@ -220,7 +218,7 @@ func (syncer *WrapperSyncer) getWrappersChannel() chan *pb.InterchainTxWrappers
select
{
select
{
case
<-
syncer
.
ctx
.
Done
()
:
case
<-
syncer
.
ctx
.
Done
()
:
return
return
case
h
,
ok
:=
<-
rawCh
:
//监听订阅消息
case
h
,
ok
:=
<-
rawCh
:
//
监听订阅消息
if
!
ok
{
if
!
ok
{
close
(
ch
)
close
(
ch
)
return
return
...
...
internal/syncer/syncer_test.go
View file @
27e44da6
...
@@ -162,7 +162,7 @@ func TestSyncHeader002(t *testing.T) {
...
@@ -162,7 +162,7 @@ func TestSyncHeader002(t *testing.T) {
h3
:=
getBlockHeader
(
root
,
3
)
h3
:=
getBlockHeader
(
root
,
3
)
// mock invalid tx wrapper
// mock invalid tx wrapper
w4
,
_
:=
getTxWrapper
(
t
,
txs
,
txs1
,
4
)
w4
,
_
:=
getTxWrapper
(
t
,
txs
,
txs1
,
4
)
//w4.InterchainTxWrappers[0].Transactions = w4.InterchainTxWrappers[0].TransactionHashes[1:]
//
w4.InterchainTxWrappers[0].Transactions = w4.InterchainTxWrappers[0].TransactionHashes[1:]
syncWrapperCh
:=
make
(
chan
interface
{},
4
)
syncWrapperCh
:=
make
(
chan
interface
{},
4
)
meta
:=
&
pb
.
ChainMeta
{
meta
:=
&
pb
.
ChainMeta
{
...
@@ -614,13 +614,13 @@ func getTxWrapper(t *testing.T, interchainTxs []*pb.BxhTransaction, innerchainTx
...
@@ -614,13 +614,13 @@ func getTxWrapper(t *testing.T, interchainTxs []*pb.BxhTransaction, innerchainTx
}
}
}
}
var
l2roots
[]
types
.
Hash
var
l2roots
[]
types
.
Hash
//var interchainTxHashes []types.Hash
//
var interchainTxHashes []types.Hash
hashes
:=
make
([]
merkletree
.
Content
,
0
,
len
(
interchainTxs
))
hashes
:=
make
([]
merkletree
.
Content
,
0
,
len
(
interchainTxs
))
for
i
:=
0
;
i
<
len
(
verifiedTxs
);
i
++
{
for
i
:=
0
;
i
<
len
(
verifiedTxs
);
i
++
{
//interchainHash, err := verifiedTxs[i].CalculateHash()
//
interchainHash, err := verifiedTxs[i].CalculateHash()
//require.Nil(t, err)
//
require.Nil(t, err)
hashes
=
append
(
hashes
,
verifiedTxs
[
i
])
hashes
=
append
(
hashes
,
verifiedTxs
[
i
])
//interchainTxHashes = append(interchainTxHashes, *interchainHash)
//
interchainTxHashes = append(interchainTxHashes, *interchainHash)
}
}
tree
,
err
:=
merkletree
.
NewTree
(
hashes
)
tree
,
err
:=
merkletree
.
NewTree
(
hashes
)
...
...
model/pb/arg.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -81,9 +83,11 @@ func (*Arg) ProtoMessage() {}
...
@@ -81,9 +83,11 @@ func (*Arg) ProtoMessage() {}
func
(
*
Arg
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Arg
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_4371b204df3ab2da
,
[]
int
{
0
}
return
fileDescriptor_4371b204df3ab2da
,
[]
int
{
0
}
}
}
func
(
m
*
Arg
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Arg
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Arg
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Arg
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Arg
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Arg
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -96,12 +100,15 @@ func (m *Arg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -96,12 +100,15 @@ func (m *Arg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Arg
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Arg
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Arg
.
Merge
(
m
,
src
)
xxx_messageInfo_Arg
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Arg
)
XXX_Size
()
int
{
func
(
m
*
Arg
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Arg
)
XXX_DiscardUnknown
()
{
func
(
m
*
Arg
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Arg
.
DiscardUnknown
(
m
)
xxx_messageInfo_Arg
.
DiscardUnknown
(
m
)
}
}
...
@@ -211,6 +218,7 @@ func encodeVarintArg(dAtA []byte, offset int, v uint64) int {
...
@@ -211,6 +218,7 @@ func encodeVarintArg(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
Arg
)
Size
()
(
n
int
)
{
func
(
m
*
Arg
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -233,9 +241,11 @@ func (m *Arg) Size() (n int) {
...
@@ -233,9 +241,11 @@ func (m *Arg) Size() (n int) {
func
sovArg
(
x
uint64
)
(
n
int
)
{
func
sovArg
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozArg
(
x
uint64
)
(
n
int
)
{
func
sozArg
(
x
uint64
)
(
n
int
)
{
return
sovArg
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovArg
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
Arg
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Arg
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -362,6 +372,7 @@ func (m *Arg) Unmarshal(dAtA []byte) error {
...
@@ -362,6 +372,7 @@ func (m *Arg) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipArg
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipArg
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/basic.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -33,9 +35,11 @@ func (*Uint64Slice) ProtoMessage() {}
...
@@ -33,9 +35,11 @@ func (*Uint64Slice) ProtoMessage() {}
func
(
*
Uint64Slice
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Uint64Slice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
0
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
0
}
}
}
func
(
m
*
Uint64Slice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Uint64Slice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Uint64Slice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Uint64Slice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Uint64Slice
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Uint64Slice
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -48,12 +52,15 @@ func (m *Uint64Slice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
...
@@ -48,12 +52,15 @@ func (m *Uint64Slice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Uint64Slice
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Uint64Slice
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Uint64Slice
.
Merge
(
m
,
src
)
xxx_messageInfo_Uint64Slice
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Uint64Slice
)
XXX_Size
()
int
{
func
(
m
*
Uint64Slice
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Uint64Slice
)
XXX_DiscardUnknown
()
{
func
(
m
*
Uint64Slice
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Uint64Slice
.
DiscardUnknown
(
m
)
xxx_messageInfo_Uint64Slice
.
DiscardUnknown
(
m
)
}
}
...
@@ -78,9 +85,11 @@ func (*StringUint64Map) ProtoMessage() {}
...
@@ -78,9 +85,11 @@ func (*StringUint64Map) ProtoMessage() {}
func
(
*
StringUint64Map
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StringUint64Map
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
1
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
1
}
}
}
func
(
m
*
StringUint64Map
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StringUint64Map
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
StringUint64Map
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
StringUint64Map
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_StringUint64Map
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_StringUint64Map
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -93,12 +102,15 @@ func (m *StringUint64Map) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
...
@@ -93,12 +102,15 @@ func (m *StringUint64Map) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
StringUint64Map
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
StringUint64Map
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_StringUint64Map
.
Merge
(
m
,
src
)
xxx_messageInfo_StringUint64Map
.
Merge
(
m
,
src
)
}
}
func
(
m
*
StringUint64Map
)
XXX_Size
()
int
{
func
(
m
*
StringUint64Map
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
StringUint64Map
)
XXX_DiscardUnknown
()
{
func
(
m
*
StringUint64Map
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_StringUint64Map
.
DiscardUnknown
(
m
)
xxx_messageInfo_StringUint64Map
.
DiscardUnknown
(
m
)
}
}
...
@@ -130,9 +142,11 @@ func (*StringUint64SliceMap) ProtoMessage() {}
...
@@ -130,9 +142,11 @@ func (*StringUint64SliceMap) ProtoMessage() {}
func
(
*
StringUint64SliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StringUint64SliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
2
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
2
}
}
}
func
(
m
*
StringUint64SliceMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StringUint64SliceMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
StringUint64SliceMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
StringUint64SliceMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_StringUint64SliceMap
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_StringUint64SliceMap
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -145,12 +159,15 @@ func (m *StringUint64SliceMap) XXX_Marshal(b []byte, deterministic bool) ([]byte
...
@@ -145,12 +159,15 @@ func (m *StringUint64SliceMap) XXX_Marshal(b []byte, deterministic bool) ([]byte
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
StringUint64SliceMap
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
StringUint64SliceMap
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_StringUint64SliceMap
.
Merge
(
m
,
src
)
xxx_messageInfo_StringUint64SliceMap
.
Merge
(
m
,
src
)
}
}
func
(
m
*
StringUint64SliceMap
)
XXX_Size
()
int
{
func
(
m
*
StringUint64SliceMap
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
StringUint64SliceMap
)
XXX_DiscardUnknown
()
{
func
(
m
*
StringUint64SliceMap
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_StringUint64SliceMap
.
DiscardUnknown
(
m
)
xxx_messageInfo_StringUint64SliceMap
.
DiscardUnknown
(
m
)
}
}
...
@@ -182,9 +199,11 @@ func (*VerifiedIndex) ProtoMessage() {}
...
@@ -182,9 +199,11 @@ func (*VerifiedIndex) ProtoMessage() {}
func
(
*
VerifiedIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
VerifiedIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
3
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
3
}
}
}
func
(
m
*
VerifiedIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
VerifiedIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
VerifiedIndex
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
VerifiedIndex
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_VerifiedIndex
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_VerifiedIndex
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -197,12 +216,15 @@ func (m *VerifiedIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
...
@@ -197,12 +216,15 @@ func (m *VerifiedIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
VerifiedIndex
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
VerifiedIndex
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_VerifiedIndex
.
Merge
(
m
,
src
)
xxx_messageInfo_VerifiedIndex
.
Merge
(
m
,
src
)
}
}
func
(
m
*
VerifiedIndex
)
XXX_Size
()
int
{
func
(
m
*
VerifiedIndex
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
VerifiedIndex
)
XXX_DiscardUnknown
()
{
func
(
m
*
VerifiedIndex
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_VerifiedIndex
.
DiscardUnknown
(
m
)
xxx_messageInfo_VerifiedIndex
.
DiscardUnknown
(
m
)
}
}
...
@@ -233,9 +255,11 @@ func (*VerifiedIndexSlice) ProtoMessage() {}
...
@@ -233,9 +255,11 @@ func (*VerifiedIndexSlice) ProtoMessage() {}
func
(
*
VerifiedIndexSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
VerifiedIndexSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
4
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
4
}
}
}
func
(
m
*
VerifiedIndexSlice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
VerifiedIndexSlice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
VerifiedIndexSlice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
VerifiedIndexSlice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_VerifiedIndexSlice
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_VerifiedIndexSlice
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -248,12 +272,15 @@ func (m *VerifiedIndexSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte,
...
@@ -248,12 +272,15 @@ func (m *VerifiedIndexSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte,
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
VerifiedIndexSlice
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
VerifiedIndexSlice
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_VerifiedIndexSlice
.
Merge
(
m
,
src
)
xxx_messageInfo_VerifiedIndexSlice
.
Merge
(
m
,
src
)
}
}
func
(
m
*
VerifiedIndexSlice
)
XXX_Size
()
int
{
func
(
m
*
VerifiedIndexSlice
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
VerifiedIndexSlice
)
XXX_DiscardUnknown
()
{
func
(
m
*
VerifiedIndexSlice
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_VerifiedIndexSlice
.
DiscardUnknown
(
m
)
xxx_messageInfo_VerifiedIndexSlice
.
DiscardUnknown
(
m
)
}
}
...
@@ -278,9 +305,11 @@ func (*StringVerifiedIndexMap) ProtoMessage() {}
...
@@ -278,9 +305,11 @@ func (*StringVerifiedIndexMap) ProtoMessage() {}
func
(
*
StringVerifiedIndexMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StringVerifiedIndexMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
5
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
5
}
}
}
func
(
m
*
StringVerifiedIndexMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StringVerifiedIndexMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
StringVerifiedIndexMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
StringVerifiedIndexMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_StringVerifiedIndexMap
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_StringVerifiedIndexMap
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -293,12 +322,15 @@ func (m *StringVerifiedIndexMap) XXX_Marshal(b []byte, deterministic bool) ([]by
...
@@ -293,12 +322,15 @@ func (m *StringVerifiedIndexMap) XXX_Marshal(b []byte, deterministic bool) ([]by
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
StringVerifiedIndexMap
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
StringVerifiedIndexMap
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_StringVerifiedIndexMap
.
Merge
(
m
,
src
)
xxx_messageInfo_StringVerifiedIndexMap
.
Merge
(
m
,
src
)
}
}
func
(
m
*
StringVerifiedIndexMap
)
XXX_Size
()
int
{
func
(
m
*
StringVerifiedIndexMap
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
StringVerifiedIndexMap
)
XXX_DiscardUnknown
()
{
func
(
m
*
StringVerifiedIndexMap
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_StringVerifiedIndexMap
.
DiscardUnknown
(
m
)
xxx_messageInfo_StringVerifiedIndexMap
.
DiscardUnknown
(
m
)
}
}
...
@@ -330,9 +362,11 @@ func (*StringVerifiedIndexSliceMap) ProtoMessage() {}
...
@@ -330,9 +362,11 @@ func (*StringVerifiedIndexSliceMap) ProtoMessage() {}
func
(
*
StringVerifiedIndexSliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
StringVerifiedIndexSliceMap
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
6
}
return
fileDescriptor_0cc45f6ac745dd88
,
[]
int
{
6
}
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_StringVerifiedIndexSliceMap
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_StringVerifiedIndexSliceMap
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -345,12 +379,15 @@ func (m *StringVerifiedIndexSliceMap) XXX_Marshal(b []byte, deterministic bool)
...
@@ -345,12 +379,15 @@ func (m *StringVerifiedIndexSliceMap) XXX_Marshal(b []byte, deterministic bool)
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_StringVerifiedIndexSliceMap
.
Merge
(
m
,
src
)
xxx_messageInfo_StringVerifiedIndexSliceMap
.
Merge
(
m
,
src
)
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Size
()
int
{
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_DiscardUnknown
()
{
func
(
m
*
StringVerifiedIndexSliceMap
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_StringVerifiedIndexSliceMap
.
DiscardUnknown
(
m
)
xxx_messageInfo_StringVerifiedIndexSliceMap
.
DiscardUnknown
(
m
)
}
}
...
@@ -719,6 +756,7 @@ func encodeVarintBasic(dAtA []byte, offset int, v uint64) int {
...
@@ -719,6 +756,7 @@ func encodeVarintBasic(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
Uint64Slice
)
Size
()
(
n
int
)
{
func
(
m
*
Uint64Slice
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -853,9 +891,11 @@ func (m *StringVerifiedIndexSliceMap) Size() (n int) {
...
@@ -853,9 +891,11 @@ func (m *StringVerifiedIndexSliceMap) Size() (n int) {
func
sovBasic
(
x
uint64
)
(
n
int
)
{
func
sovBasic
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozBasic
(
x
uint64
)
(
n
int
)
{
func
sozBasic
(
x
uint64
)
(
n
int
)
{
return
sovBasic
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovBasic
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
Uint64Slice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Uint64Slice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -982,6 +1022,7 @@ func (m *Uint64Slice) Unmarshal(dAtA []byte) error {
...
@@ -982,6 +1022,7 @@ func (m *Uint64Slice) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
StringUint64Map
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
StringUint64Map
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1140,6 +1181,7 @@ func (m *StringUint64Map) Unmarshal(dAtA []byte) error {
...
@@ -1140,6 +1181,7 @@ func (m *StringUint64Map) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
StringUint64SliceMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
StringUint64SliceMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1256,6 +1298,7 @@ func (m *StringUint64SliceMap) Unmarshal(dAtA []byte) error {
...
@@ -1256,6 +1298,7 @@ func (m *StringUint64SliceMap) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
VerifiedIndex
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
VerifiedIndex
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1345,6 +1388,7 @@ func (m *VerifiedIndex) Unmarshal(dAtA []byte) error {
...
@@ -1345,6 +1388,7 @@ func (m *VerifiedIndex) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
VerifiedIndexSlice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
VerifiedIndexSlice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1429,6 +1473,7 @@ func (m *VerifiedIndexSlice) Unmarshal(dAtA []byte) error {
...
@@ -1429,6 +1473,7 @@ func (m *VerifiedIndexSlice) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
StringVerifiedIndexMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
StringVerifiedIndexMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1545,6 +1590,7 @@ func (m *StringVerifiedIndexMap) Unmarshal(dAtA []byte) error {
...
@@ -1545,6 +1590,7 @@ func (m *StringVerifiedIndexMap) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
StringVerifiedIndexSliceMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
StringVerifiedIndexSliceMap
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1661,6 +1707,7 @@ func (m *StringVerifiedIndexSliceMap) Unmarshal(dAtA []byte) error {
...
@@ -1661,6 +1707,7 @@ func (m *StringVerifiedIndexSliceMap) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipBasic
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipBasic
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/block.pb.go
View file @
27e44da6
...
@@ -15,9 +15,11 @@ import (
...
@@ -15,9 +15,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -39,9 +41,11 @@ func (*Block) ProtoMessage() {}
...
@@ -39,9 +41,11 @@ func (*Block) ProtoMessage() {}
func
(
*
Block
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Block
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
0
}
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
0
}
}
}
func
(
m
*
Block
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Block
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Block
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Block
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Block
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Block
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -54,12 +58,15 @@ func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -54,12 +58,15 @@ func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Block
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Block
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Block
.
Merge
(
m
,
src
)
xxx_messageInfo_Block
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Block
)
XXX_Size
()
int
{
func
(
m
*
Block
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Block
)
XXX_DiscardUnknown
()
{
func
(
m
*
Block
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Block
.
DiscardUnknown
(
m
)
xxx_messageInfo_Block
.
DiscardUnknown
(
m
)
}
}
...
@@ -104,9 +111,11 @@ func (*BlockHeader) ProtoMessage() {}
...
@@ -104,9 +111,11 @@ func (*BlockHeader) ProtoMessage() {}
func
(
*
BlockHeader
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BlockHeader
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
1
}
return
fileDescriptor_8e550b1f5926e92d
,
[]
int
{
1
}
}
}
func
(
m
*
BlockHeader
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BlockHeader
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
BlockHeader
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
BlockHeader
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_BlockHeader
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_BlockHeader
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -119,12 +128,15 @@ func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
...
@@ -119,12 +128,15 @@ func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
BlockHeader
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
BlockHeader
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_BlockHeader
.
Merge
(
m
,
src
)
xxx_messageInfo_BlockHeader
.
Merge
(
m
,
src
)
}
}
func
(
m
*
BlockHeader
)
XXX_Size
()
int
{
func
(
m
*
BlockHeader
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
BlockHeader
)
XXX_DiscardUnknown
()
{
func
(
m
*
BlockHeader
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_BlockHeader
.
DiscardUnknown
(
m
)
xxx_messageInfo_BlockHeader
.
DiscardUnknown
(
m
)
}
}
...
@@ -374,6 +386,7 @@ func encodeVarintBlock(dAtA []byte, offset int, v uint64) int {
...
@@ -374,6 +386,7 @@ func encodeVarintBlock(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
Block
)
Size
()
(
n
int
)
{
func
(
m
*
Block
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -445,9 +458,11 @@ func (m *BlockHeader) Size() (n int) {
...
@@ -445,9 +458,11 @@ func (m *BlockHeader) Size() (n int) {
func
sovBlock
(
x
uint64
)
(
n
int
)
{
func
sovBlock
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozBlock
(
x
uint64
)
(
n
int
)
{
func
sozBlock
(
x
uint64
)
(
n
int
)
{
return
sovBlock
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovBlock
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
Block
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Block
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -675,6 +690,7 @@ func (m *Block) Unmarshal(dAtA []byte) error {
...
@@ -675,6 +690,7 @@ func (m *Block) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
BlockHeader
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
BlockHeader
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -975,6 +991,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error {
...
@@ -975,6 +991,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipBlock
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipBlock
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/broker.pb.go
View file @
27e44da6
This diff is collapsed.
Click to expand it.
model/pb/broker.pb.gw.go
View file @
27e44da6
This diff is collapsed.
Click to expand it.
model/pb/bxh_transaction.pb.go
View file @
27e44da6
...
@@ -15,9 +15,11 @@ import (
...
@@ -15,9 +15,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -160,9 +162,11 @@ func (*BxhTransaction) ProtoMessage() {}
...
@@ -160,9 +162,11 @@ func (*BxhTransaction) ProtoMessage() {}
func
(
*
BxhTransaction
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
BxhTransaction
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
0
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
0
}
}
}
func
(
m
*
BxhTransaction
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
BxhTransaction
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
BxhTransaction
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
BxhTransaction
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_BxhTransaction
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_BxhTransaction
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -175,12 +179,15 @@ func (m *BxhTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro
...
@@ -175,12 +179,15 @@ func (m *BxhTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
BxhTransaction
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
BxhTransaction
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_BxhTransaction
.
Merge
(
m
,
src
)
xxx_messageInfo_BxhTransaction
.
Merge
(
m
,
src
)
}
}
func
(
m
*
BxhTransaction
)
XXX_Size
()
int
{
func
(
m
*
BxhTransaction
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
BxhTransaction
)
XXX_DiscardUnknown
()
{
func
(
m
*
BxhTransaction
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_BxhTransaction
.
DiscardUnknown
(
m
)
xxx_messageInfo_BxhTransaction
.
DiscardUnknown
(
m
)
}
}
...
@@ -257,9 +264,11 @@ func (*TransactionData) ProtoMessage() {}
...
@@ -257,9 +264,11 @@ func (*TransactionData) ProtoMessage() {}
func
(
*
TransactionData
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
TransactionData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
1
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
1
}
}
}
func
(
m
*
TransactionData
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
TransactionData
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
TransactionData
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
TransactionData
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_TransactionData
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_TransactionData
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -272,12 +281,15 @@ func (m *TransactionData) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
...
@@ -272,12 +281,15 @@ func (m *TransactionData) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
TransactionData
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
TransactionData
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TransactionData
.
Merge
(
m
,
src
)
xxx_messageInfo_TransactionData
.
Merge
(
m
,
src
)
}
}
func
(
m
*
TransactionData
)
XXX_Size
()
int
{
func
(
m
*
TransactionData
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
TransactionData
)
XXX_DiscardUnknown
()
{
func
(
m
*
TransactionData
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TransactionData
.
DiscardUnknown
(
m
)
xxx_messageInfo_TransactionData
.
DiscardUnknown
(
m
)
}
}
...
@@ -330,9 +342,11 @@ func (*InvokePayload) ProtoMessage() {}
...
@@ -330,9 +342,11 @@ func (*InvokePayload) ProtoMessage() {}
func
(
*
InvokePayload
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
InvokePayload
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
2
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
2
}
}
}
func
(
m
*
InvokePayload
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
InvokePayload
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
InvokePayload
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
InvokePayload
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_InvokePayload
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_InvokePayload
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -345,12 +359,15 @@ func (m *InvokePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
...
@@ -345,12 +359,15 @@ func (m *InvokePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
InvokePayload
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
InvokePayload
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_InvokePayload
.
Merge
(
m
,
src
)
xxx_messageInfo_InvokePayload
.
Merge
(
m
,
src
)
}
}
func
(
m
*
InvokePayload
)
XXX_Size
()
int
{
func
(
m
*
InvokePayload
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
InvokePayload
)
XXX_DiscardUnknown
()
{
func
(
m
*
InvokePayload
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_InvokePayload
.
DiscardUnknown
(
m
)
xxx_messageInfo_InvokePayload
.
DiscardUnknown
(
m
)
}
}
...
@@ -383,9 +400,11 @@ func (*TransactionMeta) ProtoMessage() {}
...
@@ -383,9 +400,11 @@ func (*TransactionMeta) ProtoMessage() {}
func
(
*
TransactionMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
TransactionMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
3
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
3
}
}
}
func
(
m
*
TransactionMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
TransactionMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
TransactionMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
TransactionMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_TransactionMeta
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_TransactionMeta
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -398,12 +417,15 @@ func (m *TransactionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
...
@@ -398,12 +417,15 @@ func (m *TransactionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
TransactionMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
TransactionMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TransactionMeta
.
Merge
(
m
,
src
)
xxx_messageInfo_TransactionMeta
.
Merge
(
m
,
src
)
}
}
func
(
m
*
TransactionMeta
)
XXX_Size
()
int
{
func
(
m
*
TransactionMeta
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
TransactionMeta
)
XXX_DiscardUnknown
()
{
func
(
m
*
TransactionMeta
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TransactionMeta
.
DiscardUnknown
(
m
)
xxx_messageInfo_TransactionMeta
.
DiscardUnknown
(
m
)
}
}
...
@@ -443,9 +465,11 @@ func (*CrosschainTransactionExtra) ProtoMessage() {}
...
@@ -443,9 +465,11 @@ func (*CrosschainTransactionExtra) ProtoMessage() {}
func
(
*
CrosschainTransactionExtra
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
CrosschainTransactionExtra
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
4
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
4
}
}
}
func
(
m
*
CrosschainTransactionExtra
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
CrosschainTransactionExtra
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
CrosschainTransactionExtra
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
CrosschainTransactionExtra
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_CrosschainTransactionExtra
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_CrosschainTransactionExtra
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -458,12 +482,15 @@ func (m *CrosschainTransactionExtra) XXX_Marshal(b []byte, deterministic bool) (
...
@@ -458,12 +482,15 @@ func (m *CrosschainTransactionExtra) XXX_Marshal(b []byte, deterministic bool) (
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
CrosschainTransactionExtra
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
CrosschainTransactionExtra
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_CrosschainTransactionExtra
.
Merge
(
m
,
src
)
xxx_messageInfo_CrosschainTransactionExtra
.
Merge
(
m
,
src
)
}
}
func
(
m
*
CrosschainTransactionExtra
)
XXX_Size
()
int
{
func
(
m
*
CrosschainTransactionExtra
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
CrosschainTransactionExtra
)
XXX_DiscardUnknown
()
{
func
(
m
*
CrosschainTransactionExtra
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_CrosschainTransactionExtra
.
DiscardUnknown
(
m
)
xxx_messageInfo_CrosschainTransactionExtra
.
DiscardUnknown
(
m
)
}
}
...
@@ -502,9 +529,11 @@ func (*TransactionTracingMeta) ProtoMessage() {}
...
@@ -502,9 +529,11 @@ func (*TransactionTracingMeta) ProtoMessage() {}
func
(
*
TransactionTracingMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
TransactionTracingMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
5
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
5
}
}
}
func
(
m
*
TransactionTracingMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
TransactionTracingMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
TransactionTracingMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
TransactionTracingMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_TransactionTracingMeta
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_TransactionTracingMeta
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -517,12 +546,15 @@ func (m *TransactionTracingMeta) XXX_Marshal(b []byte, deterministic bool) ([]by
...
@@ -517,12 +546,15 @@ func (m *TransactionTracingMeta) XXX_Marshal(b []byte, deterministic bool) ([]by
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
TransactionTracingMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
TransactionTracingMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TransactionTracingMeta
.
Merge
(
m
,
src
)
xxx_messageInfo_TransactionTracingMeta
.
Merge
(
m
,
src
)
}
}
func
(
m
*
TransactionTracingMeta
)
XXX_Size
()
int
{
func
(
m
*
TransactionTracingMeta
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
TransactionTracingMeta
)
XXX_DiscardUnknown
()
{
func
(
m
*
TransactionTracingMeta
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TransactionTracingMeta
.
DiscardUnknown
(
m
)
xxx_messageInfo_TransactionTracingMeta
.
DiscardUnknown
(
m
)
}
}
...
@@ -554,9 +586,11 @@ func (*TransactionSlice) ProtoMessage() {}
...
@@ -554,9 +586,11 @@ func (*TransactionSlice) ProtoMessage() {}
func
(
*
TransactionSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
TransactionSlice
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
6
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
6
}
}
}
func
(
m
*
TransactionSlice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
TransactionSlice
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
TransactionSlice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
TransactionSlice
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_TransactionSlice
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_TransactionSlice
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -569,12 +603,15 @@ func (m *TransactionSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, er
...
@@ -569,12 +603,15 @@ func (m *TransactionSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, er
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
TransactionSlice
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
TransactionSlice
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TransactionSlice
.
Merge
(
m
,
src
)
xxx_messageInfo_TransactionSlice
.
Merge
(
m
,
src
)
}
}
func
(
m
*
TransactionSlice
)
XXX_Size
()
int
{
func
(
m
*
TransactionSlice
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
TransactionSlice
)
XXX_DiscardUnknown
()
{
func
(
m
*
TransactionSlice
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TransactionSlice
.
DiscardUnknown
(
m
)
xxx_messageInfo_TransactionSlice
.
DiscardUnknown
(
m
)
}
}
...
@@ -611,9 +648,11 @@ func (*AssetExchangeInfo) ProtoMessage() {}
...
@@ -611,9 +648,11 @@ func (*AssetExchangeInfo) ProtoMessage() {}
func
(
*
AssetExchangeInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
AssetExchangeInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
7
}
return
fileDescriptor_3eb90b06bee49601
,
[]
int
{
7
}
}
}
func
(
m
*
AssetExchangeInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
AssetExchangeInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
AssetExchangeInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
AssetExchangeInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_AssetExchangeInfo
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_AssetExchangeInfo
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -626,12 +665,15 @@ func (m *AssetExchangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
...
@@ -626,12 +665,15 @@ func (m *AssetExchangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
AssetExchangeInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
AssetExchangeInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_AssetExchangeInfo
.
Merge
(
m
,
src
)
xxx_messageInfo_AssetExchangeInfo
.
Merge
(
m
,
src
)
}
}
func
(
m
*
AssetExchangeInfo
)
XXX_Size
()
int
{
func
(
m
*
AssetExchangeInfo
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
AssetExchangeInfo
)
XXX_DiscardUnknown
()
{
func
(
m
*
AssetExchangeInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_AssetExchangeInfo
.
DiscardUnknown
(
m
)
xxx_messageInfo_AssetExchangeInfo
.
DiscardUnknown
(
m
)
}
}
...
@@ -1217,6 +1259,7 @@ func encodeVarintBxhTransaction(dAtA []byte, offset int, v uint64) int {
...
@@ -1217,6 +1259,7 @@ func encodeVarintBxhTransaction(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
BxhTransaction
)
Size
()
(
n
int
)
{
func
(
m
*
BxhTransaction
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -1423,9 +1466,11 @@ func (m *AssetExchangeInfo) Size() (n int) {
...
@@ -1423,9 +1466,11 @@ func (m *AssetExchangeInfo) Size() (n int) {
func
sovBxhTransaction
(
x
uint64
)
(
n
int
)
{
func
sovBxhTransaction
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozBxhTransaction
(
x
uint64
)
(
n
int
)
{
func
sozBxhTransaction
(
x
uint64
)
(
n
int
)
{
return
sovBxhTransaction
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovBxhTransaction
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
BxhTransaction
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
BxhTransaction
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1813,6 +1858,7 @@ func (m *BxhTransaction) Unmarshal(dAtA []byte) error {
...
@@ -1813,6 +1858,7 @@ func (m *BxhTransaction) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
TransactionData
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
TransactionData
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1991,6 +2037,7 @@ func (m *TransactionData) Unmarshal(dAtA []byte) error {
...
@@ -1991,6 +2037,7 @@ func (m *TransactionData) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
InvokePayload
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
InvokePayload
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2110,6 +2157,7 @@ func (m *InvokePayload) Unmarshal(dAtA []byte) error {
...
@@ -2110,6 +2157,7 @@ func (m *InvokePayload) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
TransactionMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
TransactionMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2235,6 +2283,7 @@ func (m *TransactionMeta) Unmarshal(dAtA []byte) error {
...
@@ -2235,6 +2283,7 @@ func (m *TransactionMeta) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
CrosschainTransactionExtra
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
CrosschainTransactionExtra
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2361,6 +2410,7 @@ func (m *CrosschainTransactionExtra) Unmarshal(dAtA []byte) error {
...
@@ -2361,6 +2410,7 @@ func (m *CrosschainTransactionExtra) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
TransactionTracingMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
TransactionTracingMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2482,6 +2532,7 @@ func (m *TransactionTracingMeta) Unmarshal(dAtA []byte) error {
...
@@ -2482,6 +2532,7 @@ func (m *TransactionTracingMeta) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
TransactionSlice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
TransactionSlice
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2588,6 +2639,7 @@ func (m *TransactionSlice) Unmarshal(dAtA []byte) error {
...
@@ -2588,6 +2639,7 @@ func (m *TransactionSlice) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
AssetExchangeInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
AssetExchangeInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -2839,6 +2891,7 @@ func (m *AssetExchangeInfo) Unmarshal(dAtA []byte) error {
...
@@ -2839,6 +2891,7 @@ func (m *AssetExchangeInfo) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipBxhTransaction
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipBxhTransaction
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/chain.pb.go
View file @
27e44da6
...
@@ -15,9 +15,11 @@ import (
...
@@ -15,9 +15,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -37,9 +39,11 @@ func (*ChainMeta) ProtoMessage() {}
...
@@ -37,9 +39,11 @@ func (*ChainMeta) ProtoMessage() {}
func
(
*
ChainMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ChainMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d4d91b2d037e7a44
,
[]
int
{
0
}
return
fileDescriptor_d4d91b2d037e7a44
,
[]
int
{
0
}
}
}
func
(
m
*
ChainMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ChainMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
ChainMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
ChainMeta
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_ChainMeta
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_ChainMeta
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -52,12 +56,15 @@ func (m *ChainMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -52,12 +56,15 @@ func (m *ChainMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
ChainMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
ChainMeta
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ChainMeta
.
Merge
(
m
,
src
)
xxx_messageInfo_ChainMeta
.
Merge
(
m
,
src
)
}
}
func
(
m
*
ChainMeta
)
XXX_Size
()
int
{
func
(
m
*
ChainMeta
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
ChainMeta
)
XXX_DiscardUnknown
()
{
func
(
m
*
ChainMeta
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ChainMeta
.
DiscardUnknown
(
m
)
xxx_messageInfo_ChainMeta
.
DiscardUnknown
(
m
)
}
}
...
@@ -159,6 +166,7 @@ func encodeVarintChain(dAtA []byte, offset int, v uint64) int {
...
@@ -159,6 +166,7 @@ func encodeVarintChain(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
ChainMeta
)
Size
()
(
n
int
)
{
func
(
m
*
ChainMeta
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -181,9 +189,11 @@ func (m *ChainMeta) Size() (n int) {
...
@@ -181,9 +189,11 @@ func (m *ChainMeta) Size() (n int) {
func
sovChain
(
x
uint64
)
(
n
int
)
{
func
sovChain
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozChain
(
x
uint64
)
(
n
int
)
{
func
sozChain
(
x
uint64
)
(
n
int
)
{
return
sovChain
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovChain
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
ChainMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
ChainMeta
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -310,6 +320,7 @@ func (m *ChainMeta) Unmarshal(dAtA []byte) error {
...
@@ -310,6 +320,7 @@ func (m *ChainMeta) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipChain
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipChain
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/commit.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -34,9 +36,11 @@ func (*CommitEvent) ProtoMessage() {}
...
@@ -34,9 +36,11 @@ func (*CommitEvent) ProtoMessage() {}
func
(
*
CommitEvent
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
CommitEvent
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_db7163399a465f48
,
[]
int
{
0
}
return
fileDescriptor_db7163399a465f48
,
[]
int
{
0
}
}
}
func
(
m
*
CommitEvent
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
CommitEvent
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
CommitEvent
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
CommitEvent
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_CommitEvent
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_CommitEvent
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -49,12 +53,15 @@ func (m *CommitEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
...
@@ -49,12 +53,15 @@ func (m *CommitEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
CommitEvent
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
CommitEvent
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_CommitEvent
.
Merge
(
m
,
src
)
xxx_messageInfo_CommitEvent
.
Merge
(
m
,
src
)
}
}
func
(
m
*
CommitEvent
)
XXX_Size
()
int
{
func
(
m
*
CommitEvent
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
CommitEvent
)
XXX_DiscardUnknown
()
{
func
(
m
*
CommitEvent
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_CommitEvent
.
DiscardUnknown
(
m
)
xxx_messageInfo_CommitEvent
.
DiscardUnknown
(
m
)
}
}
...
@@ -146,6 +153,7 @@ func encodeVarintCommit(dAtA []byte, offset int, v uint64) int {
...
@@ -146,6 +153,7 @@ func encodeVarintCommit(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
offset
+
1
return
offset
+
1
}
}
func
(
m
*
CommitEvent
)
Size
()
(
n
int
)
{
func
(
m
*
CommitEvent
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -172,9 +180,11 @@ func sovCommit(x uint64) (n int) {
...
@@ -172,9 +180,11 @@ func sovCommit(x uint64) (n int) {
}
}
return
n
return
n
}
}
func
sozCommit
(
x
uint64
)
(
n
int
)
{
func
sozCommit
(
x
uint64
)
(
n
int
)
{
return
sovCommit
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovCommit
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
CommitEvent
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
CommitEvent
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -334,6 +344,7 @@ func (m *CommitEvent) Unmarshal(dAtA []byte) error {
...
@@ -334,6 +344,7 @@ func (m *CommitEvent) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipCommit
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipCommit
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/ibtp.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -121,9 +123,11 @@ func (*IBTP) ProtoMessage() {}
...
@@ -121,9 +123,11 @@ func (*IBTP) ProtoMessage() {}
func
(
*
IBTP
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
IBTP
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
0
}
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
0
}
}
}
func
(
m
*
IBTP
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
IBTP
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
IBTP
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
IBTP
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_IBTP
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_IBTP
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -136,12 +140,15 @@ func (m *IBTP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -136,12 +140,15 @@ func (m *IBTP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
IBTP
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
IBTP
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_IBTP
.
Merge
(
m
,
src
)
xxx_messageInfo_IBTP
.
Merge
(
m
,
src
)
}
}
func
(
m
*
IBTP
)
XXX_Size
()
int
{
func
(
m
*
IBTP
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
IBTP
)
XXX_DiscardUnknown
()
{
func
(
m
*
IBTP
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_IBTP
.
DiscardUnknown
(
m
)
xxx_messageInfo_IBTP
.
DiscardUnknown
(
m
)
}
}
...
@@ -229,9 +236,11 @@ func (*Payload) ProtoMessage() {}
...
@@ -229,9 +236,11 @@ func (*Payload) ProtoMessage() {}
func
(
*
Payload
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Payload
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
1
}
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
1
}
}
}
func
(
m
*
Payload
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Payload
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Payload
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Payload
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Payload
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Payload
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -244,12 +253,15 @@ func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -244,12 +253,15 @@ func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Payload
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Payload
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Payload
.
Merge
(
m
,
src
)
xxx_messageInfo_Payload
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Payload
)
XXX_Size
()
int
{
func
(
m
*
Payload
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Payload
)
XXX_DiscardUnknown
()
{
func
(
m
*
Payload
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Payload
.
DiscardUnknown
(
m
)
xxx_messageInfo_Payload
.
DiscardUnknown
(
m
)
}
}
...
@@ -287,9 +299,11 @@ func (*Content) ProtoMessage() {}
...
@@ -287,9 +299,11 @@ func (*Content) ProtoMessage() {}
func
(
*
Content
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Content
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
2
}
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
2
}
}
}
func
(
m
*
Content
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Content
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Content
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Content
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Content
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Content
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -302,12 +316,15 @@ func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -302,12 +316,15 @@ func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Content
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Content
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Content
.
Merge
(
m
,
src
)
xxx_messageInfo_Content
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Content
)
XXX_Size
()
int
{
func
(
m
*
Content
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Content
)
XXX_DiscardUnknown
()
{
func
(
m
*
Content
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Content
.
DiscardUnknown
(
m
)
xxx_messageInfo_Content
.
DiscardUnknown
(
m
)
}
}
...
@@ -380,9 +397,11 @@ func (*IBTPs) ProtoMessage() {}
...
@@ -380,9 +397,11 @@ func (*IBTPs) ProtoMessage() {}
func
(
*
IBTPs
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
IBTPs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
3
}
return
fileDescriptor_7576a0a5bf0190a3
,
[]
int
{
3
}
}
}
func
(
m
*
IBTPs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
IBTPs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
IBTPs
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
IBTPs
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_IBTPs
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_IBTPs
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -395,12 +414,15 @@ func (m *IBTPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -395,12 +414,15 @@ func (m *IBTPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
IBTPs
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
IBTPs
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_IBTPs
.
Merge
(
m
,
src
)
xxx_messageInfo_IBTPs
.
Merge
(
m
,
src
)
}
}
func
(
m
*
IBTPs
)
XXX_Size
()
int
{
func
(
m
*
IBTPs
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
IBTPs
)
XXX_DiscardUnknown
()
{
func
(
m
*
IBTPs
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_IBTPs
.
DiscardUnknown
(
m
)
xxx_messageInfo_IBTPs
.
DiscardUnknown
(
m
)
}
}
...
@@ -731,6 +753,7 @@ func encodeVarintIbtp(dAtA []byte, offset int, v uint64) int {
...
@@ -731,6 +753,7 @@ func encodeVarintIbtp(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
IBTP
)
Size
()
(
n
int
)
{
func
(
m
*
IBTP
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -858,9 +881,11 @@ func (m *IBTPs) Size() (n int) {
...
@@ -858,9 +881,11 @@ func (m *IBTPs) Size() (n int) {
func
sovIbtp
(
x
uint64
)
(
n
int
)
{
func
sovIbtp
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozIbtp
(
x
uint64
)
(
n
int
)
{
func
sozIbtp
(
x
uint64
)
(
n
int
)
{
return
sovIbtp
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovIbtp
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
IBTP
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
IBTP
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1202,6 +1227,7 @@ func (m *IBTP) Unmarshal(dAtA []byte) error {
...
@@ -1202,6 +1227,7 @@ func (m *IBTP) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
Payload
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Payload
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1306,6 +1332,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error {
...
@@ -1306,6 +1332,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
Content
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Content
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1612,6 +1639,7 @@ func (m *Content) Unmarshal(dAtA []byte) error {
...
@@ -1612,6 +1639,7 @@ func (m *Content) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
IBTPs
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
IBTPs
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1696,6 +1724,7 @@ func (m *IBTPs) Unmarshal(dAtA []byte) error {
...
@@ -1696,6 +1724,7 @@ func (m *IBTPs) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipIbtp
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipIbtp
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/ibtpx.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -39,9 +41,11 @@ func (*IBTPX) ProtoMessage() {}
...
@@ -39,9 +41,11 @@ func (*IBTPX) ProtoMessage() {}
func
(
*
IBTPX
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
IBTPX
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_8402d80e061d514a
,
[]
int
{
0
}
return
fileDescriptor_8402d80e061d514a
,
[]
int
{
0
}
}
}
func
(
m
*
IBTPX
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
IBTPX
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
IBTPX
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
IBTPX
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_IBTPX
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_IBTPX
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -54,12 +58,15 @@ func (m *IBTPX) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -54,12 +58,15 @@ func (m *IBTPX) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
IBTPX
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
IBTPX
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_IBTPX
.
Merge
(
m
,
src
)
xxx_messageInfo_IBTPX
.
Merge
(
m
,
src
)
}
}
func
(
m
*
IBTPX
)
XXX_Size
()
int
{
func
(
m
*
IBTPX
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
IBTPX
)
XXX_DiscardUnknown
()
{
func
(
m
*
IBTPX
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_IBTPX
.
DiscardUnknown
(
m
)
xxx_messageInfo_IBTPX
.
DiscardUnknown
(
m
)
}
}
...
@@ -219,6 +226,7 @@ func encodeVarintIbtpx(dAtA []byte, offset int, v uint64) int {
...
@@ -219,6 +226,7 @@ func encodeVarintIbtpx(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
IBTPX
)
Size
()
(
n
int
)
{
func
(
m
*
IBTPX
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -258,9 +266,11 @@ func (m *IBTPX) Size() (n int) {
...
@@ -258,9 +266,11 @@ func (m *IBTPX) Size() (n int) {
func
sovIbtpx
(
x
uint64
)
(
n
int
)
{
func
sovIbtpx
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozIbtpx
(
x
uint64
)
(
n
int
)
{
func
sozIbtpx
(
x
uint64
)
(
n
int
)
{
return
sovIbtpx
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovIbtpx
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
IBTPX
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
IBTPX
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -495,6 +505,7 @@ func (m *IBTPX) Unmarshal(dAtA []byte) error {
...
@@ -495,6 +505,7 @@ func (m *IBTPX) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipIbtpx
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipIbtpx
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/interchain_meta.pb.go
View file @
27e44da6
...
@@ -15,9 +15,11 @@ import (
...
@@ -15,9 +15,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -36,9 +38,11 @@ func (*InterchainMetaS) ProtoMessage() {}
...
@@ -36,9 +38,11 @@ func (*InterchainMetaS) ProtoMessage() {}
func
(
*
InterchainMetaS
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
InterchainMetaS
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
0
}
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
0
}
}
}
func
(
m
*
InterchainMetaS
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
InterchainMetaS
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
InterchainMetaS
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
InterchainMetaS
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_InterchainMetaS
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_InterchainMetaS
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -51,12 +55,15 @@ func (m *InterchainMetaS) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
...
@@ -51,12 +55,15 @@ func (m *InterchainMetaS) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
InterchainMetaS
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
InterchainMetaS
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_InterchainMetaS
.
Merge
(
m
,
src
)
xxx_messageInfo_InterchainMetaS
.
Merge
(
m
,
src
)
}
}
func
(
m
*
InterchainMetaS
)
XXX_Size
()
int
{
func
(
m
*
InterchainMetaS
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
InterchainMetaS
)
XXX_DiscardUnknown
()
{
func
(
m
*
InterchainMetaS
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_InterchainMetaS
.
DiscardUnknown
(
m
)
xxx_messageInfo_InterchainMetaS
.
DiscardUnknown
(
m
)
}
}
...
@@ -83,9 +90,11 @@ func (*InterchainS) ProtoMessage() {}
...
@@ -83,9 +90,11 @@ func (*InterchainS) ProtoMessage() {}
func
(
*
InterchainS
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
InterchainS
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
1
}
return
fileDescriptor_d2602fcc2fbd6b2a
,
[]
int
{
1
}
}
}
func
(
m
*
InterchainS
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
InterchainS
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
InterchainS
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
InterchainS
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_InterchainS
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_InterchainS
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -98,12 +107,15 @@ func (m *InterchainS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
...
@@ -98,12 +107,15 @@ func (m *InterchainS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
InterchainS
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
InterchainS
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_InterchainS
.
Merge
(
m
,
src
)
xxx_messageInfo_InterchainS
.
Merge
(
m
,
src
)
}
}
func
(
m
*
InterchainS
)
XXX_Size
()
int
{
func
(
m
*
InterchainS
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
InterchainS
)
XXX_DiscardUnknown
()
{
func
(
m
*
InterchainS
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_InterchainS
.
DiscardUnknown
(
m
)
xxx_messageInfo_InterchainS
.
DiscardUnknown
(
m
)
}
}
...
@@ -296,6 +308,7 @@ func encodeVarintInterchainMeta(dAtA []byte, offset int, v uint64) int {
...
@@ -296,6 +308,7 @@ func encodeVarintInterchainMeta(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
InterchainMetaS
)
Size
()
(
n
int
)
{
func
(
m
*
InterchainMetaS
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -343,9 +356,11 @@ func (m *InterchainS) Size() (n int) {
...
@@ -343,9 +356,11 @@ func (m *InterchainS) Size() (n int) {
func
sovInterchainMeta
(
x
uint64
)
(
n
int
)
{
func
sovInterchainMeta
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozInterchainMeta
(
x
uint64
)
(
n
int
)
{
func
sozInterchainMeta
(
x
uint64
)
(
n
int
)
{
return
sovInterchainMeta
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovInterchainMeta
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
InterchainMetaS
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
InterchainMetaS
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -470,6 +485,7 @@ func (m *InterchainMetaS) Unmarshal(dAtA []byte) error {
...
@@ -470,6 +485,7 @@ func (m *InterchainMetaS) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
InterchainS
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
InterchainS
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -663,6 +679,7 @@ func (m *InterchainS) Unmarshal(dAtA []byte) error {
...
@@ -663,6 +679,7 @@ func (m *InterchainS) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipInterchainMeta
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipInterchainMeta
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/message.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -33,7 +35,7 @@ const (
...
@@ -33,7 +35,7 @@ const (
Message_APPCHAIN_GET
Message_Type
=
4
Message_APPCHAIN_GET
Message_Type
=
4
Message_INTERCHAIN_META_GET
Message_Type
=
5
Message_INTERCHAIN_META_GET
Message_Type
=
5
Message_RULE_DEPLOY
Message_Type
=
6
Message_RULE_DEPLOY
Message_Type
=
6
//异步完成
//
异步完成
Message_IBTP_GET
Message_Type
=
7
Message_IBTP_GET
Message_Type
=
7
Message_IBTP_SEND
Message_Type
=
8
Message_IBTP_SEND
Message_Type
=
8
Message_IBTP_RECEIPT_SEND
Message_Type
=
9
Message_IBTP_RECEIPT_SEND
Message_Type
=
9
...
@@ -91,9 +93,11 @@ func (*Message) ProtoMessage() {}
...
@@ -91,9 +93,11 @@ func (*Message) ProtoMessage() {}
func
(
*
Message
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Message
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
0
}
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
0
}
}
}
func
(
m
*
Message
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Message
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Message
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Message
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Message
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Message
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -106,12 +110,15 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -106,12 +110,15 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Message
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Message
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Message
.
Merge
(
m
,
src
)
xxx_messageInfo_Message
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Message
)
XXX_Size
()
int
{
func
(
m
*
Message
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Message
)
XXX_DiscardUnknown
()
{
func
(
m
*
Message
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Message
.
DiscardUnknown
(
m
)
xxx_messageInfo_Message
.
DiscardUnknown
(
m
)
}
}
...
@@ -150,9 +157,11 @@ func (*Pack) ProtoMessage() {}
...
@@ -150,9 +157,11 @@ func (*Pack) ProtoMessage() {}
func
(
*
Pack
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Pack
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
1
}
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
1
}
}
}
func
(
m
*
Pack
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Pack
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Pack
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Pack
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Pack
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Pack
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -165,12 +174,15 @@ func (m *Pack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -165,12 +174,15 @@ func (m *Pack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Pack
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Pack
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Pack
.
Merge
(
m
,
src
)
xxx_messageInfo_Pack
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Pack
)
XXX_Size
()
int
{
func
(
m
*
Pack
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Pack
)
XXX_DiscardUnknown
()
{
func
(
m
*
Pack
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Pack
.
DiscardUnknown
(
m
)
xxx_messageInfo_Pack
.
DiscardUnknown
(
m
)
}
}
...
@@ -202,9 +214,11 @@ func (*PeerInfo) ProtoMessage() {}
...
@@ -202,9 +214,11 @@ func (*PeerInfo) ProtoMessage() {}
func
(
*
PeerInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
PeerInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
2
}
return
fileDescriptor_33c57e4bae7b9afd
,
[]
int
{
2
}
}
}
func
(
m
*
PeerInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
PeerInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
PeerInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
PeerInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_PeerInfo
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_PeerInfo
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -217,12 +231,15 @@ func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -217,12 +231,15 @@ func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
PeerInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
PeerInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_PeerInfo
.
Merge
(
m
,
src
)
xxx_messageInfo_PeerInfo
.
Merge
(
m
,
src
)
}
}
func
(
m
*
PeerInfo
)
XXX_Size
()
int
{
func
(
m
*
PeerInfo
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
PeerInfo
)
XXX_DiscardUnknown
()
{
func
(
m
*
PeerInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_PeerInfo
.
DiscardUnknown
(
m
)
xxx_messageInfo_PeerInfo
.
DiscardUnknown
(
m
)
}
}
...
@@ -415,6 +432,7 @@ func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
...
@@ -415,6 +432,7 @@ func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
Message
)
Size
()
(
n
int
)
{
func
(
m
*
Message
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -471,9 +489,11 @@ func (m *PeerInfo) Size() (n int) {
...
@@ -471,9 +489,11 @@ func (m *PeerInfo) Size() (n int) {
func
sovMessage
(
x
uint64
)
(
n
int
)
{
func
sovMessage
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozMessage
(
x
uint64
)
(
n
int
)
{
func
sozMessage
(
x
uint64
)
(
n
int
)
{
return
sovMessage
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovMessage
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
Message
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Message
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -611,6 +631,7 @@ func (m *Message) Unmarshal(dAtA []byte) error {
...
@@ -611,6 +631,7 @@ func (m *Message) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
Pack
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Pack
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -715,6 +736,7 @@ func (m *Pack) Unmarshal(dAtA []byte) error {
...
@@ -715,6 +736,7 @@ func (m *Pack) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
PeerInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
PeerInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -829,6 +851,7 @@ func (m *PeerInfo) Unmarshal(dAtA []byte) error {
...
@@ -829,6 +851,7 @@ func (m *PeerInfo) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipMessage
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipMessage
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/plugin.pb.go
View file @
27e44da6
This diff is collapsed.
Click to expand it.
model/pb/receipt.go
View file @
27e44da6
...
@@ -42,7 +42,7 @@ type Log struct {
...
@@ -42,7 +42,7 @@ type Log struct {
Removed
bool
`json:"removed"`
Removed
bool
`json:"removed"`
}
}
//MarshalJSON marshals as JSON.
//
MarshalJSON marshals as JSON.
func
(
l
EvmLog
)
MarshalJSON
()
([]
byte
,
error
)
{
func
(
l
EvmLog
)
MarshalJSON
()
([]
byte
,
error
)
{
var
enc
Log
var
enc
Log
...
...
model/pb/receipt.pb.go
View file @
27e44da6
...
@@ -15,9 +15,11 @@ import (
...
@@ -15,9 +15,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -68,9 +70,11 @@ func (*Receipt) ProtoMessage() {}
...
@@ -68,9 +70,11 @@ func (*Receipt) ProtoMessage() {}
func
(
*
Receipt
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Receipt
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
0
}
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
0
}
}
}
func
(
m
*
Receipt
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Receipt
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Receipt
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Receipt
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Receipt
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Receipt
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -83,12 +87,15 @@ func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -83,12 +87,15 @@ func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Receipt
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Receipt
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Receipt
.
Merge
(
m
,
src
)
xxx_messageInfo_Receipt
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Receipt
)
XXX_Size
()
int
{
func
(
m
*
Receipt
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Receipt
)
XXX_DiscardUnknown
()
{
func
(
m
*
Receipt
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Receipt
.
DiscardUnknown
(
m
)
xxx_messageInfo_Receipt
.
DiscardUnknown
(
m
)
}
}
...
@@ -147,9 +154,11 @@ func (*Receipts) ProtoMessage() {}
...
@@ -147,9 +154,11 @@ func (*Receipts) ProtoMessage() {}
func
(
*
Receipts
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Receipts
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
1
}
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
1
}
}
}
func
(
m
*
Receipts
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Receipts
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Receipts
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Receipts
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Receipts
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Receipts
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -162,12 +171,15 @@ func (m *Receipts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -162,12 +171,15 @@ func (m *Receipts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Receipts
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Receipts
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Receipts
.
Merge
(
m
,
src
)
xxx_messageInfo_Receipts
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Receipts
)
XXX_Size
()
int
{
func
(
m
*
Receipts
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Receipts
)
XXX_DiscardUnknown
()
{
func
(
m
*
Receipts
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Receipts
.
DiscardUnknown
(
m
)
xxx_messageInfo_Receipts
.
DiscardUnknown
(
m
)
}
}
...
@@ -195,9 +207,11 @@ func (*Event) ProtoMessage() {}
...
@@ -195,9 +207,11 @@ func (*Event) ProtoMessage() {}
func
(
*
Event
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Event
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
2
}
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
2
}
}
}
func
(
m
*
Event
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
Event
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
Event
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
Event
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_Event
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_Event
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -210,12 +224,15 @@ func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -210,12 +224,15 @@ func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
Event
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
Event
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Event
.
Merge
(
m
,
src
)
xxx_messageInfo_Event
.
Merge
(
m
,
src
)
}
}
func
(
m
*
Event
)
XXX_Size
()
int
{
func
(
m
*
Event
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
Event
)
XXX_DiscardUnknown
()
{
func
(
m
*
Event
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Event
.
DiscardUnknown
(
m
)
xxx_messageInfo_Event
.
DiscardUnknown
(
m
)
}
}
...
@@ -254,9 +271,11 @@ func (*EvmLog) ProtoMessage() {}
...
@@ -254,9 +271,11 @@ func (*EvmLog) ProtoMessage() {}
func
(
*
EvmLog
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
EvmLog
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
3
}
return
fileDescriptor_ace1d6eb38fad2c8
,
[]
int
{
3
}
}
}
func
(
m
*
EvmLog
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
EvmLog
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
EvmLog
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
EvmLog
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_EvmLog
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_EvmLog
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -269,12 +288,15 @@ func (m *EvmLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -269,12 +288,15 @@ func (m *EvmLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
EvmLog
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
EvmLog
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_EvmLog
.
Merge
(
m
,
src
)
xxx_messageInfo_EvmLog
.
Merge
(
m
,
src
)
}
}
func
(
m
*
EvmLog
)
XXX_Size
()
int
{
func
(
m
*
EvmLog
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
EvmLog
)
XXX_DiscardUnknown
()
{
func
(
m
*
EvmLog
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_EvmLog
.
DiscardUnknown
(
m
)
xxx_messageInfo_EvmLog
.
DiscardUnknown
(
m
)
}
}
...
@@ -682,6 +704,7 @@ func encodeVarintReceipt(dAtA []byte, offset int, v uint64) int {
...
@@ -682,6 +704,7 @@ func encodeVarintReceipt(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
Receipt
)
Size
()
(
n
int
)
{
func
(
m
*
Receipt
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -810,9 +833,11 @@ func (m *EvmLog) Size() (n int) {
...
@@ -810,9 +833,11 @@ func (m *EvmLog) Size() (n int) {
func
sovReceipt
(
x
uint64
)
(
n
int
)
{
func
sovReceipt
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozReceipt
(
x
uint64
)
(
n
int
)
{
func
sozReceipt
(
x
uint64
)
(
n
int
)
{
return
sovReceipt
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovReceipt
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
Receipt
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Receipt
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1145,6 +1170,7 @@ func (m *Receipt) Unmarshal(dAtA []byte) error {
...
@@ -1145,6 +1170,7 @@ func (m *Receipt) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
Receipts
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Receipts
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1232,6 +1258,7 @@ func (m *Receipts) Unmarshal(dAtA []byte) error {
...
@@ -1232,6 +1258,7 @@ func (m *Receipts) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
Event
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
Event
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1374,6 +1401,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
...
@@ -1374,6 +1401,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
(
m
*
EvmLog
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
EvmLog
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -1678,6 +1706,7 @@ func (m *EvmLog) Unmarshal(dAtA []byte) error {
...
@@ -1678,6 +1706,7 @@ func (m *EvmLog) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipReceipt
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipReceipt
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
model/pb/vp_info.pb.go
View file @
27e44da6
...
@@ -13,9 +13,11 @@ import (
...
@@ -13,9 +13,11 @@ import (
)
)
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
(
var
_
=
fmt
.
Errorf
_
=
proto
.
Marshal
var
_
=
math
.
Inf
_
=
fmt
.
Errorf
_
=
math
.
Inf
)
// This is a compile-time assertion to ensure that this generated file
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// is compatible with the proto package it is being compiled against.
...
@@ -36,9 +38,11 @@ func (*VpInfo) ProtoMessage() {}
...
@@ -36,9 +38,11 @@ func (*VpInfo) ProtoMessage() {}
func
(
*
VpInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
VpInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_7477e72a440db3af
,
[]
int
{
0
}
return
fileDescriptor_7477e72a440db3af
,
[]
int
{
0
}
}
}
func
(
m
*
VpInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
VpInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
return
m
.
Unmarshal
(
b
)
}
}
func
(
m
*
VpInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
func
(
m
*
VpInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
if
deterministic
{
if
deterministic
{
return
xxx_messageInfo_VpInfo
.
Marshal
(
b
,
m
,
deterministic
)
return
xxx_messageInfo_VpInfo
.
Marshal
(
b
,
m
,
deterministic
)
...
@@ -51,12 +55,15 @@ func (m *VpInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
...
@@ -51,12 +55,15 @@ func (m *VpInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
return
b
[
:
n
],
nil
}
}
}
}
func
(
m
*
VpInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
func
(
m
*
VpInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_VpInfo
.
Merge
(
m
,
src
)
xxx_messageInfo_VpInfo
.
Merge
(
m
,
src
)
}
}
func
(
m
*
VpInfo
)
XXX_Size
()
int
{
func
(
m
*
VpInfo
)
XXX_Size
()
int
{
return
m
.
Size
()
return
m
.
Size
()
}
}
func
(
m
*
VpInfo
)
XXX_DiscardUnknown
()
{
func
(
m
*
VpInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_VpInfo
.
DiscardUnknown
(
m
)
xxx_messageInfo_VpInfo
.
DiscardUnknown
(
m
)
}
}
...
@@ -173,6 +180,7 @@ func encodeVarintVpInfo(dAtA []byte, offset int, v uint64) int {
...
@@ -173,6 +180,7 @@ func encodeVarintVpInfo(dAtA []byte, offset int, v uint64) int {
dAtA
[
offset
]
=
uint8
(
v
)
dAtA
[
offset
]
=
uint8
(
v
)
return
base
return
base
}
}
func
(
m
*
VpInfo
)
Size
()
(
n
int
)
{
func
(
m
*
VpInfo
)
Size
()
(
n
int
)
{
if
m
==
nil
{
if
m
==
nil
{
return
0
return
0
...
@@ -202,9 +210,11 @@ func (m *VpInfo) Size() (n int) {
...
@@ -202,9 +210,11 @@ func (m *VpInfo) Size() (n int) {
func
sovVpInfo
(
x
uint64
)
(
n
int
)
{
func
sovVpInfo
(
x
uint64
)
(
n
int
)
{
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
return
(
math_bits
.
Len64
(
x
|
1
)
+
6
)
/
7
}
}
func
sozVpInfo
(
x
uint64
)
(
n
int
)
{
func
sozVpInfo
(
x
uint64
)
(
n
int
)
{
return
sovVpInfo
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
return
sovVpInfo
(
uint64
((
x
<<
1
)
^
uint64
((
int64
(
x
)
>>
63
))))
}
}
func
(
m
*
VpInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
func
(
m
*
VpInfo
)
Unmarshal
(
dAtA
[]
byte
)
error
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
@@ -373,6 +383,7 @@ func (m *VpInfo) Unmarshal(dAtA []byte) error {
...
@@ -373,6 +383,7 @@ func (m *VpInfo) Unmarshal(dAtA []byte) error {
}
}
return
nil
return
nil
}
}
func
skipVpInfo
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
func
skipVpInfo
(
dAtA
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
dAtA
)
l
:=
len
(
dAtA
)
iNdEx
:=
0
iNdEx
:=
0
...
...
pkg/plugins/grpc.go
View file @
27e44da6
...
@@ -147,7 +147,7 @@ type GRPCClient struct {
...
@@ -147,7 +147,7 @@ type GRPCClient struct {
func
(
g
*
GRPCClient
)
Initialize
(
configPath
string
,
ID
string
,
extra
[]
byte
)
error
{
func
(
g
*
GRPCClient
)
Initialize
(
configPath
string
,
ID
string
,
extra
[]
byte
)
error
{
g
.
DID
=
ID
g
.
DID
=
ID
_
,
err
:=
g
.
client
.
Initialize
(
g
.
doneContext
,
&
pb
.
InitializeRequest
{
_
,
err
:=
g
.
client
.
Initialize
(
g
.
doneContext
,
&
pb
.
InitializeRequest
{
SidecarId
:
""
,
//TODO
SidecarId
:
""
,
//
TODO
ConfigPath
:
configPath
,
ConfigPath
:
configPath
,
Extra
:
extra
,
Extra
:
extra
,
})
})
...
...
pkg/plugins/interface.go
View file @
27e44da6
...
@@ -14,7 +14,7 @@ type Kernel interface {
...
@@ -14,7 +14,7 @@ type Kernel interface {
// Client defines the interface that interacts with appchain 与 appchain交互。
// Client defines the interface that interacts with appchain 与 appchain交互。
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go
type
Client
interface
{
//业务实现委托接口。需要实现的那有些。
type
Client
interface
{
//
业务实现委托接口。需要实现的那有些。
internal
.
Launcher
internal
.
Launcher
Kernel
Kernel
Bind
(
kern
Kernel
)
Bind
(
kern
Kernel
)
...
...
pkg/plugins/plugin.go
View file @
27e44da6
...
@@ -22,13 +22,13 @@ var (
...
@@ -22,13 +22,13 @@ var (
// 宿主机进程在启动时也设置Plugins,即ClientConfig中设置Plugins时,不需要指明其实现者。
// 宿主机进程在启动时也设置Plugins,即ClientConfig中设置Plugins时,不需要指明其实现者。
// PluginMap is the map of plugins we can dispense.
// PluginMap is the map of plugins we can dispense.
var
PluginMap
=
map
[
string
]
plugin
.
Plugin
{
var
PluginMap
=
map
[
string
]
plugin
.
Plugin
{
PluginName
:
&
AppchainGRPCPlugin
{},
//宿主机进程的插件集
PluginName
:
&
AppchainGRPCPlugin
{},
//
宿主机进程的插件集
}
}
// 插件实现
// 插件实现
// This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
// This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
type
AppchainGRPCPlugin
struct
{
type
AppchainGRPCPlugin
struct
{
plugin
.
Plugin
//要嵌入(net/rpc)插件接口,是反射的作用。整个接口体需要实现:GRPCPlugin、plugin.Plugin两个接口,而plugin.Plugin并没有使用,嵌入进去即可。
plugin
.
Plugin
//
要嵌入(net/rpc)插件接口,是反射的作用。整个接口体需要实现:GRPCPlugin、plugin.Plugin两个接口,而plugin.Plugin并没有使用,嵌入进去即可。
// Concrete implementation, written in Go. This is only used for plugins
// Concrete implementation, written in Go. This is only used for plugins
// that are written in Go.
// that are written in Go.
Impl
Client
Impl
Client
...
@@ -42,7 +42,7 @@ func (p *AppchainGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Serve
...
@@ -42,7 +42,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
)
{
func
(
p
*
AppchainGRPCPlugin
)
GRPCClient
(
ctx
context
.
Context
,
broker
*
plugin
.
GRPCBroker
,
c
*
grpc
.
ClientConn
)
(
interface
{},
error
)
{
return
&
GRPCClient
{
return
&
GRPCClient
{
client
:
pb
.
NewAppchainPluginClient
(
c
),
//创建gRPC客户端的方法是自动生成的
client
:
pb
.
NewAppchainPluginClient
(
c
),
//
创建gRPC客户端的方法是自动生成的
doneContext
:
ctx
,
doneContext
:
ctx
,
},
nil
},
nil
}
}
...
...
pkg/plugins/plugin_test.go
View file @
27e44da6
...
@@ -52,7 +52,6 @@ func TestGRPCServer_Error(t *testing.T) {
...
@@ -52,7 +52,6 @@ func TestGRPCServer_Error(t *testing.T) {
_
,
err
=
grpcServer
.
GetCallbackMeta
(
ctx
,
nil
)
_
,
err
=
grpcServer
.
GetCallbackMeta
(
ctx
,
nil
)
require
.
NotNil
(
t
,
err
)
require
.
NotNil
(
t
,
err
)
}
}
func
TestGRPCServer
(
t
*
testing
.
T
)
{
func
TestGRPCServer
(
t
*
testing
.
T
)
{
...
@@ -398,8 +397,7 @@ func (mc *mockAppchainPluginClient) Type(ctx context.Context, in *pb.Empty, opts
...
@@ -398,8 +397,7 @@ func (mc *mockAppchainPluginClient) Type(ctx context.Context, in *pb.Empty, opts
var
_
pb
.
AppchainPluginClient
=
&
mockAppchainPluginClient
{}
var
_
pb
.
AppchainPluginClient
=
&
mockAppchainPluginClient
{}
//====================================
//====================================
type
mockAppchainPlugin_GetIBTPClient
struct
{
type
mockAppchainPlugin_GetIBTPClient
struct
{}
}
func
(
m
mockAppchainPlugin_GetIBTPClient
)
Recv
()
(
*
pb
.
IBTP
,
error
)
{
func
(
m
mockAppchainPlugin_GetIBTPClient
)
Recv
()
(
*
pb
.
IBTP
,
error
)
{
return
nil
,
nil
return
nil
,
nil
...
@@ -433,8 +431,7 @@ func (m mockAppchainPlugin_GetIBTPClient) RecvMsg(interface{}) error {
...
@@ -433,8 +431,7 @@ func (m mockAppchainPlugin_GetIBTPClient) RecvMsg(interface{}) error {
var
_
pb
.
AppchainPlugin_GetIBTPClient
=
&
mockAppchainPlugin_GetIBTPClient
{}
var
_
pb
.
AppchainPlugin_GetIBTPClient
=
&
mockAppchainPlugin_GetIBTPClient
{}
//==================================
//==================================
type
mockAppchainPlugin_GetIBTPServer
struct
{
type
mockAppchainPlugin_GetIBTPServer
struct
{}
}
func
(
m
mockAppchainPlugin_GetIBTPServer
)
Send
(
ibtp
*
pb
.
IBTP
)
error
{
func
(
m
mockAppchainPlugin_GetIBTPServer
)
Send
(
ibtp
*
pb
.
IBTP
)
error
{
return
nil
return
nil
...
...
pkg/plugins/start.go
View file @
27e44da6
...
@@ -31,7 +31,8 @@ func CreateClient(sidecarID string, appchainConfig repo.Appchain, extra []byte)
...
@@ -31,7 +31,8 @@ func CreateClient(sidecarID string, appchainConfig repo.Appchain, extra []byte)
Cmd
:
exec
.
Command
(
"sh"
,
"-c"
,
pluginPath
),
Cmd
:
exec
.
Command
(
"sh"
,
"-c"
,
pluginPath
),
Logger
:
logger
,
Logger
:
logger
,
AllowedProtocols
:
[]
plugin
.
Protocol
{
AllowedProtocols
:
[]
plugin
.
Protocol
{
plugin
.
ProtocolGRPC
},
//只支持grpc
plugin
.
ProtocolGRPC
,
},
// 只支持grpc
})
})
// Connect via RPC
// Connect via RPC
...
@@ -79,7 +80,8 @@ func CreateClients(appchainConfigs repo.Appchains, extra []byte) []Client {
...
@@ -79,7 +80,8 @@ func CreateClients(appchainConfigs repo.Appchains, extra []byte) []Client {
Cmd
:
exec
.
Command
(
"sh"
,
"-c"
,
pluginPath
),
Cmd
:
exec
.
Command
(
"sh"
,
"-c"
,
pluginPath
),
Logger
:
logger
,
Logger
:
logger
,
AllowedProtocols
:
[]
plugin
.
Protocol
{
AllowedProtocols
:
[]
plugin
.
Protocol
{
plugin
.
ProtocolGRPC
},
//只支持grpc
plugin
.
ProtocolGRPC
,
},
// 只支持grpc
})
})
// Connect via RPC
// Connect via RPC
rpcClient
,
err
:=
kernel
.
Client
()
rpcClient
,
err
:=
kernel
.
Client
()
...
...
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