Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
plugin
Commits
7c5ce435
Commit
7c5ce435
authored
Apr 02, 2019
by
kingwang
Committed by
33cn
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chain33 04/02
parent
0ba0605f
Hide whitespace changes
Inline
Side-by-side
Showing
65 changed files
with
1695 additions
and
1457 deletions
+1695
-1457
execaccount.go
vendor/github.com/33cn/chain33/account/execaccount.go
+3
-4
docker-compose.sh
vendor/github.com/33cn/chain33/build/docker-compose.sh
+18
-5
queueprotocol_test.go
vendor/github.com/33cn/chain33/client/queueprotocol_test.go
+0
-9
rpc_ctx_test.go
vendor/github.com/33cn/chain33/client/rpc_ctx_test.go
+0
-6
advance.go
vendor/github.com/33cn/chain33/cmd/tools/commands/advance.go
+0
-71
simple.go
vendor/github.com/33cn/chain33/cmd/tools/commands/simple.go
+0
-49
chain33.cpm.toml
...github.com/33cn/chain33/cmd/tools/config/chain33.cpm.toml
+0
-6
demo.proto
vendor/github.com/33cn/chain33/cmd/tools/config/demo.proto
+0
-17
exec_header.template
...ub.com/33cn/chain33/cmd/tools/config/exec_header.template
+0
-6
Makefile
...33cn/chain33/cmd/tools/config/simpletemplate/cmd/Makefile
+0
-4
build.sh
...33cn/chain33/cmd/tools/config/simpletemplate/cmd/build.sh
+0
-11
commands.go.tmp
.../cmd/tools/config/simpletemplate/commands/commands.go.tmp
+0
-49
${EXECNAME}.go.tmp
...d/tools/config/simpletemplate/executor/${EXECNAME}.go.tmp
+0
-2
exec.go.tmp
...in33/cmd/tools/config/simpletemplate/executor/exec.go.tmp
+0
-0
exec_del_local.go.tmp
...ools/config/simpletemplate/executor/exec_del_local.go.tmp
+0
-0
exec_local.go.tmp
...md/tools/config/simpletemplate/executor/exec_local.go.tmp
+0
-0
query.go.tmp
...n33/cmd/tools/config/simpletemplate/executor/query.go.tmp
+0
-0
plugin.go.tmp
...3cn/chain33/cmd/tools/config/simpletemplate/plugin.go.tmp
+0
-19
${EXECNAME}.proto.tmp
...d/tools/config/simpletemplate/proto/${EXECNAME}.proto.tmp
+0
-0
Makefile
...cn/chain33/cmd/tools/config/simpletemplate/proto/Makefile
+0
-2
create_protobuf.sh
.../cmd/tools/config/simpletemplate/proto/create_protobuf.sh
+0
-2
jrpc.go.tmp
...n/chain33/cmd/tools/config/simpletemplate/rpc/jrpc.go.tmp
+0
-1
rpc.go.tmp
...cn/chain33/cmd/tools/config/simpletemplate/rpc/rpc.go.tmp
+0
-1
types.go.tmp
...hain33/cmd/tools/config/simpletemplate/types/types.go.tmp
+0
-1
types.go.tmp
...ain33/cmd/tools/config/simpletemplate/wallet/types.go.tmp
+0
-1
Makefile
...b.com/33cn/chain33/cmd/tools/config/template/cmd/Makefile
+0
-4
build.sh
...b.com/33cn/chain33/cmd/tools/config/template/cmd/build.sh
+0
-11
commands.go.tmp
...hain33/cmd/tools/config/template/commands/commands.go.tmp
+0
-7
${CLASSNAME}.go.tmp
...33/cmd/tools/config/template/executor/${CLASSNAME}.go.tmp
+0
-44
plugin.go.tmp
....com/33cn/chain33/cmd/tools/config/template/plugin.go.tmp
+0
-18
Makefile
...com/33cn/chain33/cmd/tools/config/template/proto/Makefile
+0
-2
create_protobuf.sh
...hain33/cmd/tools/config/template/proto/create_protobuf.sh
+0
-2
jrpc.go.tmp
...om/33cn/chain33/cmd/tools/config/template/rpc/jrpc.go.tmp
+0
-2
rpc.go.tmp
...com/33cn/chain33/cmd/tools/config/template/rpc/rpc.go.tmp
+0
-2
types.go.tmp
...m/33cn/chain33/cmd/tools/config/template/rpc/types.go.tmp
+0
-26
types_content.template
....com/33cn/chain33/cmd/tools/config/types_content.template
+0
-44
doc.go
vendor/github.com/33cn/chain33/cmd/tools/doc.go
+0
-48
gencalculator.md
...or/github.com/33cn/chain33/cmd/tools/doc/gencalculator.md
+21
-22
gendapp.md
vendor/github.com/33cn/chain33/cmd/tools/doc/gendapp.md
+3
-3
main.go
vendor/github.com/33cn/chain33/cmd/tools/main.go
+0
-2
advance.go
vendor/github.com/33cn/chain33/cmd/tools/strategy/advance.go
+0
-146
importpackage.go
...thub.com/33cn/chain33/cmd/tools/strategy/importpackage.go
+1
-4
simple.go
vendor/github.com/33cn/chain33/cmd/tools/strategy/simple.go
+0
-49
strategy.go
...or/github.com/33cn/chain33/cmd/tools/strategy/strategy.go
+0
-12
create_dappsource_task.go
...om/33cn/chain33/cmd/tools/tasks/create_dappsource_task.go
+0
-167
tasks_test.go
vendor/github.com/33cn/chain33/cmd/tools/tasks/tasks_test.go
+0
-15
downloadblocks.go
vendor/github.com/33cn/chain33/p2p/downloadblocks.go
+2
-1
node.go
vendor/github.com/33cn/chain33/p2p/node.go
+8
-6
client.go
vendor/github.com/33cn/chain33/rpc/client.go
+0
-20
client_test.go
vendor/github.com/33cn/chain33/rpc/client_test.go
+0
-48
grpchandler.go
vendor/github.com/33cn/chain33/rpc/grpchandler.go
+0
-5
grpchandler_test.go
vendor/github.com/33cn/chain33/rpc/grpchandler_test.go
+0
-29
jrpchandler.go
vendor/github.com/33cn/chain33/rpc/jrpchandler.go
+0
-31
jrpchandler_test.go
vendor/github.com/33cn/chain33/rpc/jrpchandler_test.go
+0
-94
tree.go
vendor/github.com/33cn/chain33/system/store/mavl/db/tree.go
+15
-0
ticket.go
...hub.com/33cn/chain33/system/store/mavl/db/types/ticket.go
+19
-0
ticket.pb.go
....com/33cn/chain33/system/store/mavl/db/types/ticket.pb.go
+1404
-0
cfg.go
vendor/github.com/33cn/chain33/types/cfg.go
+2
-0
config.go
vendor/github.com/33cn/chain33/types/config.go
+21
-9
chain33client.go
vendor/github.com/33cn/chain33/types/mocks/chain33client.go
+0
-30
rpc.proto
vendor/github.com/33cn/chain33/types/proto/rpc.proto
+0
-2
transaction.proto
vendor/github.com/33cn/chain33/types/proto/transaction.proto
+0
-7
rpc.pb.go
vendor/github.com/33cn/chain33/types/rpc.pb.go
+67
-102
transaction.pb.go
vendor/github.com/33cn/chain33/types/transaction.pb.go
+109
-175
util.go
vendor/github.com/33cn/chain33/util/util.go
+2
-2
No files found.
vendor/github.com/33cn/chain33/account/execaccount.go
View file @
7c5ce435
...
...
@@ -223,16 +223,15 @@ func (acc *DB) ExecAddress(name string) string {
return
address
.
ExecAddress
(
name
)
}
// ExecDepositFrozen 执行
// ExecDepositFrozen 执行
增发coins
func
(
acc
*
DB
)
ExecDepositFrozen
(
addr
,
execaddr
string
,
amount
int64
)
(
*
types
.
Receipt
,
error
)
{
if
addr
==
execaddr
{
return
nil
,
types
.
ErrSendSameToRecv
}
//这个函数只有挖矿的合约才能调用
list
:=
types
.
AllowDepositExec
allow
:=
false
for
_
,
exec
:=
range
list
{
if
acc
.
ExecAddress
(
string
(
exec
)
)
==
execaddr
{
for
_
,
exec
:=
range
types
.
GetMinerExecs
()
{
if
acc
.
ExecAddress
(
exec
)
==
execaddr
{
allow
=
true
break
}
...
...
vendor/github.com/33cn/chain33/build/docker-compose.sh
View file @
7c5ce435
...
...
@@ -274,12 +274,15 @@ function sync() {
function
transfer
()
{
echo
"=========== # transfer ============="
${
CLI
}
account balance
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins
prebalance
=
$(${
CLI
}
account balance
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins | jq
-r
".balance"
)
${
CLI
}
block last_header
curHeight
=
$(${
CLI
}
block last_header | jq
".height"
)
echo
"curheight=
$curHeight
"
hashes
=()
for
((
i
=
0
;
i < 10
;
i++
))
;
do
hash
=
$(${
CLI
}
send coins transfer
-a
1
-n
test
-t
1
2qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
-k
CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944
)
hash
=
$(${
CLI
}
send coins transfer
-a
1
-n
test
-t
1
KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-k
CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944
)
echo
"
$hash
"
hashes
=(
"
${
hashes
[@]
}
"
"
$hash
"
)
done
...
...
@@ -299,17 +302,27 @@ function transfer() {
fi
done
${
CLI
}
account balance
-a
1
2qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
-e
coins
${
CLI
}
account balance
-a
1
KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins
local times
=
100
while
true
;
do
balance
=
$(${
CLI
}
account balance
-a
12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
-e
coins | jq
-r
".balance"
)
echo
"account balance is
${
balance
}
, expect 10.0000 "
newbalance
=
$(${
CLI
}
account balance
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins | jq
-r
".balance"
)
echo
"newbalance balance is
${
newbalance
}
"
balance
=
$(
echo
"
$newbalance
-
$prebalance
"
| bc
)
echo
"account added balance is
${
balance
}
, expect 10.0000 "
if
[
"
${
balance
}
"
!=
"10.0000"
]
;
then
block_wait 2
times
=
$((
times
-
1
))
if
[
$times
-le
0
]
;
then
echo
"account balance transfer failed"
echo
"account balance transfer failed, all tx list below:"
for
((
i
=
0
;
i <
${#
hashes
[*]
}
;
i++
))
;
do
echo
"------the
$i
tx=
${
hashes
[
$i
]
}
----------"
${
CLI
}
tx query_hash
-s
"
${
hashes
[
$i
]
}
"
done
echo
"----------block info------------------"
lastheight
=
$(${
CLI
}
block last_header | jq
-r
".height"
)
${
CLI
}
block get
-s
1
-e
"
${
lastheight
}
"
-d
1
exit
1
fi
else
...
...
vendor/github.com/33cn/chain33/client/queueprotocol_test.go
View file @
7c5ce435
...
...
@@ -819,7 +819,6 @@ func TestGRPC(t *testing.T) {
testGetBlocksGRPC
(
t
,
&
grpcMock
)
testGetLastHeaderGRPC
(
t
,
&
grpcMock
)
testCreateRawTransactionGRPC
(
t
,
&
grpcMock
)
testSendRawTransactionGRPC
(
t
,
&
grpcMock
)
testQueryTransactionGRPC
(
t
,
&
grpcMock
)
testSendTransactionGRPC
(
t
,
&
grpcMock
)
testGetTransactionByAddrGRPC
(
t
,
&
grpcMock
)
...
...
@@ -1132,14 +1131,6 @@ func testQueryTransactionGRPC(t *testing.T, rpc *mockGRPCSystem) {
}
}
func
testSendRawTransactionGRPC
(
t
*
testing
.
T
,
rpc
*
mockGRPCSystem
)
{
var
res
types
.
Reply
err
:=
rpc
.
newRpcCtx
(
"SendRawTransaction"
,
&
types
.
SignedTx
{},
&
res
)
if
err
!=
nil
{
t
.
Error
(
"Call SendRawTransaction Failed."
,
err
)
}
}
func
testCreateRawTransactionGRPC
(
t
*
testing
.
T
,
rpc
*
mockGRPCSystem
)
{
var
res
types
.
UnsignTx
err
:=
rpc
.
newRpcCtx
(
"CreateRawTransaction"
,
...
...
vendor/github.com/33cn/chain33/client/rpc_ctx_test.go
View file @
7c5ce435
...
...
@@ -114,12 +114,6 @@ func (c *GrpcCtx) Run() (err error) {
*
c
.
Res
.
(
*
types
.
UnsignTx
)
=
*
reply
}
errRet
=
err
case
"SendRawTransaction"
:
reply
,
err
:=
rpc
.
SendRawTransaction
(
context
.
Background
(),
c
.
Params
.
(
*
types
.
SignedTx
))
if
err
==
nil
{
*
c
.
Res
.
(
*
types
.
Reply
)
=
*
reply
}
errRet
=
err
case
"QueryTransaction"
:
reply
,
err
:=
rpc
.
QueryTransaction
(
context
.
Background
(),
c
.
Params
.
(
*
types
.
ReqHash
))
if
err
==
nil
{
...
...
vendor/github.com/33cn/chain33/cmd/tools/commands/advance.go
deleted
100644 → 0
View file @
0ba0605f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
commands
import
(
"fmt"
"github.com/33cn/chain33/cmd/tools/strategy"
"github.com/33cn/chain33/cmd/tools/types"
"github.com/spf13/cobra"
)
//AdvanceCmd advance cmd
func
AdvanceCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"advance"
,
Short
:
"Create executor project in advance mode"
,
Run
:
advanceCreate
,
}
addAdvanceCreateFlag
(
cmd
)
return
cmd
}
func
addAdvanceCreateFlag
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"name"
,
"n"
,
""
,
"executor project and class name"
)
cmd
.
MarkFlagRequired
(
"name"
)
cmd
.
Flags
()
.
StringP
(
"action"
,
"a"
,
""
,
"executor action class name"
)
cmd
.
Flags
()
.
StringP
(
"propfile"
,
"p"
,
""
,
"protobuf file path"
)
cmd
.
Flags
()
.
StringP
(
"templatepath"
,
"t"
,
""
,
"template file path"
)
}
func
advanceCreate
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
configFolder
:=
"config/"
projectName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"name"
)
className
:=
projectName
actionName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"action"
)
if
len
(
actionName
)
==
0
{
actionName
=
className
+
"Action"
}
propFile
,
_
:=
cmd
.
Flags
()
.
GetString
(
"propfile"
)
if
len
(
propFile
)
==
0
{
propFile
=
fmt
.
Sprintf
(
"%s%s.proto"
,
configFolder
,
projectName
)
}
templateFile
,
_
:=
cmd
.
Flags
()
.
GetString
(
"templatepath"
)
if
len
(
templateFile
)
==
0
{
templateFile
=
fmt
.
Sprintf
(
"%stemplate/"
,
configFolder
)
}
fmt
.
Println
(
"Begin execute advance task"
)
fmt
.
Println
(
"Config Path"
,
configFolder
)
fmt
.
Println
(
"Project Name:"
,
projectName
)
fmt
.
Println
(
"Class Name:"
,
className
)
fmt
.
Println
(
"Action Class Name:"
,
actionName
)
fmt
.
Println
(
"Protobuf File:"
,
propFile
)
fmt
.
Println
(
"Template File Path:"
,
templateFile
)
s
:=
strategy
.
New
(
types
.
KeyCreateAdvanceExecProject
)
if
s
==
nil
{
fmt
.
Println
(
types
.
KeyCreateAdvanceExecProject
,
"Not support"
)
return
}
s
.
SetParam
(
types
.
KeyConfigFolder
,
configFolder
)
s
.
SetParam
(
types
.
KeyProjectName
,
projectName
)
s
.
SetParam
(
types
.
KeyClassName
,
className
)
s
.
SetParam
(
types
.
KeyExecutorName
,
projectName
)
s
.
SetParam
(
types
.
KeyActionName
,
actionName
)
s
.
SetParam
(
types
.
KeyProtobufFile
,
propFile
)
s
.
SetParam
(
types
.
KeyTemplateFilePath
,
templateFile
)
s
.
Run
()
}
vendor/github.com/33cn/chain33/cmd/tools/commands/simple.go
deleted
100644 → 0
View file @
0ba0605f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
commands
import
(
"fmt"
"github.com/33cn/chain33/cmd/tools/strategy"
"github.com/33cn/chain33/cmd/tools/types"
"github.com/spf13/cobra"
)
//SimpleCmd 简单命令
func
SimpleCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"simple"
,
Short
:
"Create simple executor project mode"
,
Run
:
simpleCreate
,
}
addSimpleCreateFlag
(
cmd
)
return
cmd
}
func
addSimpleCreateFlag
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"name"
,
"n"
,
""
,
"executor project and class name"
)
cmd
.
MarkFlagRequired
(
"name"
)
cmd
.
Flags
()
.
StringP
(
"templatefile"
,
"t"
,
""
,
"template file path"
)
}
func
simpleCreate
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
projectName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"name"
)
className
:=
projectName
templateFile
,
_
:=
cmd
.
Flags
()
.
GetString
(
"templatefile"
)
if
len
(
templateFile
)
==
0
{
templateFile
=
fmt
.
Sprintf
(
"template/%s.proto"
,
projectName
)
}
s
:=
strategy
.
New
(
types
.
KeyCreateSimpleExecProject
)
if
s
==
nil
{
fmt
.
Println
(
types
.
KeyCreateSimpleExecProject
,
"Not support"
)
return
}
s
.
SetParam
(
types
.
KeyProjectName
,
projectName
)
s
.
SetParam
(
types
.
KeyClassName
,
className
)
s
.
SetParam
(
types
.
KeyTemplateFilePath
,
templateFile
)
s
.
Run
()
}
vendor/github.com/33cn/chain33/cmd/tools/config/chain33.cpm.toml
deleted
100644 → 0
View file @
0ba0605f
# type字段仅支持 consensus dapp store mempool
[mempool-price]
type
=
"mempool"
gitrepo
=
"github.com/33cn/plugin/plugin/mempool/price"
version
=
""
vendor/github.com/33cn/chain33/cmd/tools/config/demo.proto
deleted
100644 → 0
View file @
0ba0605f
syntax
=
"proto3"
;
package
types
;
message
DemoAction
{
oneof
value
{
DemoHello
hello
=
1
;
DemoEcho
echo
=
2
;
}
int32
ty
=
3
;
}
message
DemoHello
{}
message
DemoEcho
{
string
data
=
1
;
}
vendor/github.com/33cn/chain33/cmd/tools/config/exec_header.template
deleted
100644 → 0
View file @
0ba0605f
package
executor
import
(
ptypes
"github.com/33cn/plugin/plugin/dapp/${EXECNAME}/types"
"github.com/33cn/chain33/types"
)
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/cmd/Makefile
deleted
100644 → 0
View file @
0ba0605f
all
:
chmod
+x ./build.sh
./build.sh
$(OUT)
$(FLAG)
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/cmd/build.sh
deleted
100644 → 0
View file @
0ba0605f
#!/bin/sh
strpwd
=
$(
pwd
)
strcmd
=
${
strpwd
##*dapp/
}
strapp
=
${
strcmd
%/cmd*
}
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/commands/commands.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
commands
import
"github.com/spf13/cobra"
func
Cmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"${EXECNAME}"
,
Short
:
"${EXECNAME} show hello"
,
Args
:
cobra
.
MinimumNArgs
(
1
),
}
cmd
.
AddCommand
(
AddMessageCmd
(),
QueryMessageCmd
(),
)
return
cmd
}
func
AddMessageCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"add"
,
Short
:
"add a new message"
,
Run
:
addMessage
,
}
addMessageFlags
(
cmd
)
return
cmd
}
func
addMessageFlags
(
cmd
*
cobra
.
Command
)
{
}
func
addMessage
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
}
func
QueryMessageCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"query"
,
Short
:
"query message"
,
Run
:
queryMessage
,
}
queryMessageFlags
(
cmd
)
return
cmd
}
func
queryMessageFlags
(
cmd
*
cobra
.
Command
)
{
}
func
queryMessage
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
}
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/executor/${EXECNAME}.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
executor
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/executor/exec.go.tmp
deleted
100644 → 0
View file @
0ba0605f
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/executor/exec_del_local.go.tmp
deleted
100644 → 0
View file @
0ba0605f
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/executor/exec_local.go.tmp
deleted
100644 → 0
View file @
0ba0605f
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/executor/query.go.tmp
deleted
100644 → 0
View file @
0ba0605f
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/plugin.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
${
EXECNAME
}
import
(
"github.com/33cn/chain33/plugin/dapp/${EXECNAME}/commands"
"github.com/33cn/chain33/plugin/dapp/${EXECNAME}/executor"
pty
"github.com/33cn/chain33/plugin/dapp/${EXECNAME}/types"
"github.com/33cn/chain33/pluginmgr"
)
func
init
()
{
pluginmgr
.
Register
(&
pluginmgr
.
PluginBase
{
Name
:
pty
.${
EXECNAME
}
X
,
ExecName
:
executor
.
GetName
(),
Exec
:
executor
.
Init
,
Cmd
:
commands
.
Cmd
,
RPC
:
rpc
.
Init
,
})
}
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/proto/${EXECNAME}.proto.tmp
deleted
100644 → 0
View file @
0ba0605f
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/proto/Makefile
deleted
100644 → 0
View file @
0ba0605f
all
:
sh ./create_protobuf.sh
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/proto/create_protobuf.sh
deleted
100644 → 0
View file @
0ba0605f
#!/bin/sh
protoc
--go_out
=
plugins
=
grpc:../types ./
*
.proto
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/rpc/jrpc.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
rpc
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/rpc/rpc.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
rpc
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/types/types.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
types
vendor/github.com/33cn/chain33/cmd/tools/config/simpletemplate/wallet/types.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
wallet
vendor/github.com/33cn/chain33/cmd/tools/config/template/cmd/Makefile
deleted
100644 → 0
View file @
0ba0605f
all
:
chmod
+x ./build.sh
./build.sh
$(OUT)
$(FLAG)
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/template/cmd/build.sh
deleted
100644 → 0
View file @
0ba0605f
#!/bin/sh
strpwd
=
$(
pwd
)
strcmd
=
${
strpwd
##*dapp/
}
strapp
=
${
strcmd
%/cmd*
}
OUT_DIR
=
"
${
1
}
/
$strapp
"
#FLAG=$2
mkdir
-p
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
vendor/github.com/33cn/chain33/cmd/tools/config/template/commands/commands.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
commands
import
"github.com/spf13/cobra"
func
Cmd
()
*
cobra
.
Command
{
return
&
cobra
.
Command
{}
}
vendor/github.com/33cn/chain33/cmd/tools/config/template/executor/${CLASSNAME}.go.tmp
deleted
100755 → 0
View file @
0ba0605f
package
executor
import
(
"fmt"
log
"github.com/33cn/chain33/common/log/log15"
ptypes
"github.com/33cn/chain33/plugin/dapp/${CLASSNAME}/types"
drivers
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
)
var
(
ptylog
=
log
.
New
(
"module"
,
"execs.${CLASSNAME}"
)
)
var
driverName
=
ptypes
.${
CLASSNAME
}
X
func
init
()
{
ety
:=
types
.
LoadExecutorType
(
driverName
)
ety
.
InitFuncList
(
types
.
ListMethod
(&${
CLASSNAME
}{}))
}
func
Init
(
name
string
)
{
drivers
.
Register
(
GetName
(),
newGame
,
0
)
}
type
${
CLASSNAME
}
struct
{
drivers
.
DriverBase
}
func
new
${
CLASSNAME
}()
drivers
.
Driver
{
t
:=
&${
CLASSNAME
}{}
t
.
SetChild
(
t
)
t
.
SetExecutorType
(
types
.
LoadExecutorType
(
driverName
))
return
t
}
func
GetName
()
string
{
return
new
${
CLASSNAME
}().
GetName
()
}
func
(
u
*${
CLASSNAME
})
GetDriverName
()
string
{
return
driverName
}
vendor/github.com/33cn/chain33/cmd/tools/config/template/plugin.go.tmp
deleted
100755 → 0
View file @
0ba0605f
package
unfreeze
import
(
"github.com/33cn/plugin/plugin/dapp/${CLASSNAME}/commands"
"github.com/33cn/plugin/plugin/dapp/${CLASSNAME}/types"
"github.com/33cn/plugin/plugin/dapp/${CLASSNAME}/executor"
"github.com/33cn/chain33/pluginmgr"
)
func
init
()
{
pluginmgr
.
Register
(&
pluginmgr
.
PluginBase
{
Name
:
types
.
PackageName
,
ExecName
:
executor
.
GetName
(),
Exec
:
executor
.
Init
,
Cmd
:
commands
.
Cmd
,
RPC
:
nil
,
})
}
vendor/github.com/33cn/chain33/cmd/tools/config/template/proto/Makefile
deleted
100755 → 0
View file @
0ba0605f
all
:
./create_protobuf.sh
vendor/github.com/33cn/chain33/cmd/tools/config/template/proto/create_protobuf.sh
deleted
100755 → 0
View file @
0ba0605f
#!/bin/sh
protoc
--go_out
=
plugins
=
grpc:../types ./
*
.proto
vendor/github.com/33cn/chain33/cmd/tools/config/template/rpc/jrpc.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
rpc
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/template/rpc/rpc.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
rpc
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/config/template/rpc/types.go.tmp
deleted
100644 → 0
View file @
0ba0605f
package
rpc
import
(
ptypes
"github.com/33cn/plugin/plugin/dapp/${EXECNAME}/types"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
)
type
channelClient
struct
{
rpctypes
.
ChannelClient
}
type
Jrpc
struct
{
cli
*
channelClient
}
type
Grpc
struct
{
*
channelClient
}
func
Init
(
name
string
,
s
rpctypes
.
RPCServer
)
{
cli
:=
&
channelClient
{}
grpc
:=
&
Grpc
{
channelClient
:
cli
}
cli
.
Init
(
name
,
s
,
&
Jrpc
{
cli
:
cli
},
grpc
)
ptypes
.
RegisterTradeServer
(
s
.
GRPC
(),
grpc
)
}
vendor/github.com/33cn/chain33/cmd/tools/config/types_content.template
deleted
100644 → 0
View file @
0ba0605f
package
types
import
(
"github.com/33cn/chain33/types"
)
//
action
for
executor
${
ACTIONIDTEXT
}
${
TYLOGACTIONTYPE
}
var
(
logMap
=
${
LOGMAPTEXT
}
typeMap
=
${
TYPEMAPTEXT
}
)
func
init
()
{
types
.
AllowUserExec
=
append
(
types
.
AllowUserExec
,
[]
byte
(${
EXECNAME
}))
types
.
RegistorExecutor
(
types
.${
EXECNAME
},
NewType
())
}
type
${
TYPENAME
}
struct
{
types
.
ExecTypeBase
}
func
NewType
()
*${
TYPENAME
}
{
c
:=
&${
TYPENAME
}{}
c
.
SetChild
(
c
)
return
c
}
func
(
t
*${
TYPENAME
})
GetPayload
()
types
.
Message
{
return
&${
ACTIONNAME
}{}
}
func
(
t
*${
TYPENAME
})
GetTypeMap
()
map
[
string
]
int32
{
return
typeMap
}
func
(
t
*${
TYPENAME
})
GetLogMap
()
map
[
int64
]*
types
.
LogInfo
{
return
logMap
}
\ No newline at end of file
vendor/github.com/33cn/chain33/cmd/tools/doc.go
View file @
7c5ce435
...
...
@@ -3,54 +3,6 @@
// license that can be found in the LICENSE file.
/*
Package main chain33开发者工具,主要提供以下功能:
1. 通过chain33.cpm.toml配置,指定需要下载的包,从远程下载到本地 import
2. 通过本地创建各种执行器工程,相关命令为 simple, advance
3. 扫描本地插件信息,更新引用关系
4. 通过本地创建完整的插件项目,可以选择simple模式和advance模式.
目录介绍
1. config目录为tools工具使用的配置目录
2. config/chain33.cpm.toml 是tools工具通过go vendor下载三方系统插件的配置
3. config/exec_header.template 是tools工具创建执行器过程中使用的代码模板
4. config/types_content.template 是tools工具创建执行器过程中使用的代码模板
5. config/template 目录是tools工具创建执行器过程中使用的代码模板
库包获取的步骤
简单执行器工程向导
高级执行器工程向导
文字替换规则:
${PROJECTNAME}: 设定的项目名称
${CLASSNAME}: 设定的执行器类名
${ACTIONNAME}: 执行器内部逻辑使用的
${EXECNAME}: 执行器的名称
${TYPENAME}:
自动创建文件:
exec.go : 执行器功能中
exec_local.go:
exec_del_local.go
使用步骤:
1. 按照proto3的语法格式,创建执行器使用的Action结构,参考结构如下
// actions
message DemoAction {
oneof value {
DemoCreate create = 1;
DemoRun play = 2;
DemoClose show = 3;
}
int32 ty = 6;
}
2. 实现Action中使用的所有类型,例如上面的DemoCreate、DemoRun、DemoClose
3. 将编辑好的协议文件保存到tools所在目录下的config内
4. 使用命令行生成
命令行说明:
示例:tools advance -n demo
-a --action 执行器中Action使用的类型名,如果不填则为执行器名称+Action,例如DemoAction
-n --name 执行器的项目名和类名,必填参数
-p --propfile 导入执行器类型的proto3协议模板,如果不填默认为config/执行器名称.proto
-t --templatepath 生成执行器项目的模板文件,不填默认为config/template下的所有文件
更新初始化文件:
扫描指定path目录下所有的插件,根据扫描到的结果重新更新consensus、dapp和、store、mempool的初始化文件 init.go
...
...
vendor/github.com/33cn/chain33/cmd/tools/doc/gencalculator.md
View file @
7c5ce435
...
...
@@ -11,55 +11,54 @@ calculator合约支持在区块链上进行整数加减乘除交易操作,同
syntax
=
"proto3"
;
package
calculator
;
//calculator 合约交易行为总类型
//
calculator 合约交易行为总类型
message
CalculatorAction
{
oneof
value
{
Add
add
=
1
;
Subtract
sub
=
2
;
Multiply
mul
=
3
;
Divide
div
=
4
;
Add
add
=
1
;
Subtract
sub
=
2
;
Multiply
mul
=
3
;
Divide
div
=
4
;
}
int32
ty
=
5
;
}
message
Add
{
//加法action类型
int32
summand
=
1
;
//被加数
int32
addend
=
2
;
//加数
message
Add
{
int32
summand
=
1
;
//被加数
int32
addend
=
2
;
//加数
}
message
AddLog
{
//加法log类型
int32
sum
=
1
;
//和
message
AddLog
{
int32
sum
=
1
;
//和
}
message
Subtract
{
int32
minuend
=
1
;
//被减数
int32
subtrahend
=
2
;
//减数
int32
minuend
=
1
;
//被减数
int32
subtrahend
=
2
;
//减数
}
message
SubLog
{
int32
remainder
=
1
;
//差
int32
remainder
=
1
;
//差
}
message
Multiply
{
int32
faciend
=
1
;
//被乘数
int32
multiplier
=
2
;
//乘数
int32
faciend
=
1
;
//被乘数
int32
multiplier
=
2
;
//乘数
}
message
MultiplyLog
{
int32
product
=
1
;
//积
int32
product
=
1
;
//积
}
message
Divide
{
int32
dividend
=
1
;
//被除数
int32
divisor
=
2
;
//除数
int32
divisor
=
2
;
//除数
}
message
DivideLog
{
int32
quotient
=
1
;
//商
int32
remain
=
2
;
//余数
int32
remain
=
2
;
//余数
}
message
ReqQueryCalcCount
{
//查询计算次数请求结构
message
ReqQueryCalcCount
{
string
action
=
1
;
}
message
ReplyQueryCalcCount
{
//查询计算次数响应结构
message
ReplyQueryCalcCount
{
int32
count
=
1
;
}
...
...
@@ -78,7 +77,7 @@ service calculator {
### 代码生成
##### 生成基本代码
>使用chain33-tool,工具使用参考[文档](
[开发步骤](https://github.com/33cn/chain33/blob/master/cmd/tools/doc/gendapp.md)
)
>使用chain33-tool,工具使用参考[文档](
https://github.com/33cn/chain33/blob/master/cmd/tools/doc/gendapp.md
)
```
//本例默认将calculator生成至官方plugin项目dapp目录下
$ chain33-tool gendapp -n calculator -p calculator.proto
...
...
vendor/github.com/33cn/chain33/cmd/tools/doc/gendapp.md
View file @
7c5ce435
...
...
@@ -40,7 +40,7 @@ $ chain33-tool gendapp -n demo -p ./demo.proto -o github.com/33cn/chain33/plugin
### proto规范
*
定义合约交易行为结构,采用
**oneof value**
形式,且名称必须为
**NameAction**
格式,
如demo合约,定义echo和hello两种交易行为
```
```
proto
message
DemoAction
{
oneof
value
{
DemoHello
hello
=
1
;
...
...
@@ -50,12 +50,12 @@ message DemoAction {
}
```
*
package name设为合约名,适配后续生成目录结构
```
```
proto
package
demo
;
```
*
定义service,直接以合约名作为名称
```
```
proto
service
demo
{
}
```
...
...
vendor/github.com/33cn/chain33/cmd/tools/main.go
View file @
7c5ce435
...
...
@@ -23,8 +23,6 @@ func main() {
func
addCommands
(
rootCmd
*
cobra
.
Command
)
{
rootCmd
.
AddCommand
(
commands
.
SimpleCmd
(),
commands
.
AdvanceCmd
(),
commands
.
ImportCmd
(),
commands
.
UpdateInitCmd
(),
commands
.
CreatePluginCmd
(),
...
...
vendor/github.com/33cn/chain33/cmd/tools/strategy/advance.go
deleted
100644 → 0
View file @
0ba0605f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
strategy
import
(
"fmt"
"os"
"path/filepath"
"github.com/33cn/chain33/cmd/tools/tasks"
"github.com/33cn/chain33/cmd/tools/types"
"github.com/33cn/chain33/cmd/tools/util"
sysutil
"github.com/33cn/chain33/util"
"github.com/pkg/errors"
)
type
advanceCreateExecProjStrategy
struct
{
strategyBasic
projName
string
// 创建的执行器包名
execName
string
clsName
string
// 执行器主体类名
actionName
string
// 执行器处理过程中的Action类名
propFile
string
// protobuf 源文件路径
templateFile
string
// 生成执行器的模板文件路径
outputFolder
string
// 生成执行器的输出目录
configFolder
string
// 应用运行的配置目录
}
func
(
ad
*
advanceCreateExecProjStrategy
)
Run
()
error
{
fmt
.
Println
(
"Begin run chain33 create executor project advance mode."
)
defer
fmt
.
Println
(
"Run chain33 create executor project advance mode finish."
)
ad
.
initMember
()
if
!
ad
.
checkParamValid
()
{
return
errors
.
New
(
"InvalidParams"
)
}
return
ad
.
runImpl
()
}
func
(
ad
*
advanceCreateExecProjStrategy
)
checkParamValid
()
bool
{
return
true
}
func
(
ad
*
advanceCreateExecProjStrategy
)
initMember
()
{
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyConfigFolder
);
err
==
nil
{
ad
.
configFolder
=
v
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyProjectName
);
err
==
nil
{
ad
.
projName
=
v
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyClassName
);
err
==
nil
{
ad
.
clsName
=
v
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyExecutorName
);
err
==
nil
{
ad
.
execName
=
v
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyActionName
);
err
==
nil
{
ad
.
actionName
,
_
=
sysutil
.
MakeStringToUpper
(
v
,
0
,
1
)
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyProtobufFile
);
err
==
nil
{
ad
.
propFile
=
v
}
if
v
,
err
:=
ad
.
getParam
(
types
.
KeyTemplateFilePath
);
err
==
nil
{
ad
.
templateFile
=
v
}
// 默认输出到chain33项目的plugin/dapp/目录下
var
outputPath
string
gopath
:=
os
.
Getenv
(
"GOPATH"
)
if
len
(
gopath
)
>
0
{
outputPath
=
filepath
.
Join
(
gopath
,
"/src/github.com/33cn/chain33/plugin/dapp/"
)
}
if
len
(
outputPath
)
>
0
&&
util
.
CheckPathExisted
(
outputPath
)
{
ad
.
outputFolder
=
fmt
.
Sprintf
(
"%s/%s/"
,
outputPath
,
ad
.
projName
)
}
else
{
// 默认就在当前目录下
ad
.
outputFolder
=
fmt
.
Sprintf
(
"output/%s/"
,
ad
.
projName
)
}
util
.
MakeDir
(
ad
.
outputFolder
)
}
func
(
ad
*
advanceCreateExecProjStrategy
)
runImpl
()
error
{
var
err
error
task
:=
ad
.
buildTask
()
for
{
if
task
==
nil
{
break
}
err
=
task
.
Execute
()
if
err
!=
nil
{
mlog
.
Error
(
"Execute command failed."
,
"error"
,
err
,
"taskname"
,
task
.
GetName
())
break
}
task
=
task
.
Next
()
}
return
err
}
func
(
ad
*
advanceCreateExecProjStrategy
)
buildTask
()
tasks
.
Task
{
taskSlice
:=
make
([]
tasks
.
Task
,
0
)
taskSlice
=
append
(
taskSlice
,
// 检查用户编写的protobuf文件是否存在
&
tasks
.
CheckFileExistedTask
{
FileName
:
ad
.
propFile
,
},
// 将文件复制到输出目录下
&
tasks
.
CopyTemplateToOutputTask
{
TemplatePath
:
ad
.
templateFile
,
OutputPath
:
ad
.
outputFolder
,
ProjectName
:
ad
.
projName
,
ClassName
:
ad
.
clsName
,
},
&
tasks
.
ReplaceTargetTask
{
OutputPath
:
ad
.
outputFolder
,
ProjectName
:
ad
.
projName
,
ClassName
:
ad
.
clsName
,
ActionName
:
ad
.
actionName
,
ExecName
:
ad
.
execName
,
},
&
tasks
.
CreateDappSourceTask
{
TemplatePath
:
ad
.
templateFile
,
OutputPath
:
ad
.
outputFolder
,
ProjectName
:
ad
.
projName
,
ClsName
:
ad
.
clsName
,
ActionName
:
ad
.
actionName
,
TypeName
:
ad
.
clsName
+
"Type"
,
ExecuteName
:
ad
.
execName
,
ProtoFile
:
ad
.
propFile
,
ExecHeaderTempFile
:
ad
.
configFolder
+
"/exec_header.template"
,
TypeTempFile
:
ad
.
configFolder
+
"/types_content.template"
,
TypeOutputFile
:
ad
.
outputFolder
+
"ptypes/"
,
},
&
tasks
.
FormatDappSourceTask
{
OutputFolder
:
ad
.
outputFolder
,
},
)
task
:=
taskSlice
[
0
]
sliceLen
:=
len
(
taskSlice
)
for
n
:=
1
;
n
<
sliceLen
;
n
++
{
task
.
SetNext
(
taskSlice
[
n
])
task
=
taskSlice
[
n
]
}
return
taskSlice
[
0
]
}
vendor/github.com/33cn/chain33/cmd/tools/strategy/importpackage.go
View file @
7c5ce435
...
...
@@ -253,10 +253,7 @@ func (im *importPackageStrategy) fetchPlugin(gitrepo, version string) error {
func
(
im
*
importPackageStrategy
)
fetchPluginPackage
()
error
{
mlog
.
Info
(
"下载插件源码包"
)
pwd
:=
util
.
Pwd
()
err
:=
os
.
Chdir
(
im
.
projRootPath
)
if
err
!=
nil
{
return
err
}
defer
os
.
Chdir
(
pwd
)
for
_
,
plugins
:=
range
im
.
items
{
for
_
,
plugin
:=
range
plugins
{
...
...
vendor/github.com/33cn/chain33/cmd/tools/strategy/simple.go
deleted
100644 → 0
View file @
0ba0605f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
strategy
import
"github.com/33cn/chain33/cmd/tools/tasks"
type
simpleCreateExecProjStrategy
struct
{
strategyBasic
}
func
(
s
*
simpleCreateExecProjStrategy
)
Run
()
error
{
mlog
.
Info
(
"Begin run chain33 simple create dapp project."
)
defer
mlog
.
Info
(
"Run chain33 simple create dapp project finish."
)
if
err
:=
s
.
initMember
();
err
!=
nil
{
return
err
}
return
s
.
runImpl
()
}
func
(
s
*
simpleCreateExecProjStrategy
)
runImpl
()
error
{
// 复制模板目录下的文件到指定的目标目录,同时替换掉文件名
// 遍历目标文件夹内所有文件,替换内部标签
// 执行shell命令,生成对应的 pb.go 文件
// 更新引用文件
var
err
error
task
:=
s
.
buildTask
()
for
{
if
task
==
nil
{
break
}
err
=
task
.
Execute
()
if
err
!=
nil
{
mlog
.
Error
(
"Execute command failed."
,
"error"
,
err
,
"taskname"
,
task
.
GetName
())
break
}
task
=
task
.
Next
()
}
return
err
}
func
(
s
*
simpleCreateExecProjStrategy
)
initMember
()
error
{
return
nil
}
func
(
s
*
simpleCreateExecProjStrategy
)
buildTask
()
tasks
.
Task
{
return
nil
}
vendor/github.com/33cn/chain33/cmd/tools/strategy/strategy.go
View file @
7c5ce435
...
...
@@ -32,18 +32,6 @@ func New(name string) Strategy {
params
:
make
(
map
[
string
]
string
),
},
}
case
types
.
KeyCreateSimpleExecProject
:
return
&
simpleCreateExecProjStrategy
{
strategyBasic
:
strategyBasic
{
params
:
make
(
map
[
string
]
string
),
},
}
case
types
.
KeyCreateAdvanceExecProject
:
return
&
advanceCreateExecProjStrategy
{
strategyBasic
:
strategyBasic
{
params
:
make
(
map
[
string
]
string
),
},
}
case
types
.
KeyUpdateInit
:
return
&
updateInitStrategy
{
strategyBasic
:
strategyBasic
{
...
...
vendor/github.com/33cn/chain33/cmd/tools/tasks/create_dappsource_task.go
deleted
100644 → 0
View file @
0ba0605f
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
tasks
import
(
"fmt"
"strings"
"github.com/33cn/chain33/cmd/tools/types"
"github.com/33cn/chain33/cmd/tools/util"
)
// CreateDappSourceTask 通过生成好的pb.go和预先设计的模板,生成反射程序源码
type
CreateDappSourceTask
struct
{
TaskBase
TemplatePath
string
// 生成最终源码时的模板路径
OutputPath
string
ProjectName
string
ClsName
string
// 生成源码的类名
ActionName
string
// 生成源码的Action类名
TypeName
string
ExecuteName
string
ProtoFile
string
// 推导的原始proto文件
ExecHeaderTempFile
string
TypeTempFile
string
TypeOutputFile
string
actionInfos
[]
*
actionInfoItem
// Action中的成员变量名称PB格式
execHeaderTempContent
string
}
//GetName 获取name
func
(
c
*
CreateDappSourceTask
)
GetName
()
string
{
return
"CreateDappSourceTask"
}
//Execute 执行
func
(
c
*
CreateDappSourceTask
)
Execute
()
error
{
mlog
.
Info
(
"Execute create build app source task."
)
if
err
:=
c
.
init
();
err
!=
nil
{
return
err
}
if
err
:=
c
.
readActionMemberNames
();
err
!=
nil
{
return
err
}
if
err
:=
c
.
createExecFile
();
err
!=
nil
{
return
err
}
if
err
:=
c
.
createExecLocalFile
();
err
!=
nil
{
return
err
}
if
err
:=
c
.
createExecDelLocalFile
();
err
!=
nil
{
return
err
}
if
err
:=
c
.
createTypeExecuteFile
();
err
!=
nil
{
return
err
}
return
nil
}
func
(
c
*
CreateDappSourceTask
)
init
()
error
{
if
!
util
.
CheckFileIsExist
(
c
.
ExecHeaderTempFile
)
{
return
fmt
.
Errorf
(
"file %s not exist"
,
c
.
ExecHeaderTempFile
)
}
contentbt
,
err
:=
util
.
ReadFile
(
c
.
ExecHeaderTempFile
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"read file %s failed. error %q"
,
c
.
ExecHeaderTempFile
,
err
)
}
content
:=
strings
.
Replace
(
string
(
contentbt
),
types
.
TagClassName
,
c
.
ClsName
,
-
1
)
content
=
strings
.
Replace
(
content
,
types
.
TagExecName
,
c
.
ExecuteName
,
-
1
)
c
.
execHeaderTempContent
=
content
return
nil
}
func
(
c
*
CreateDappSourceTask
)
readActionMemberNames
()
error
{
var
err
error
pbContext
,
err
:=
util
.
ReadFile
(
c
.
ProtoFile
)
if
err
!=
nil
{
return
err
}
c
.
actionInfos
,
err
=
readDappActionFromProto
(
string
(
pbContext
),
c
.
ActionName
)
return
err
}
func
(
c
*
CreateDappSourceTask
)
createExecFile
()
error
{
content
:=
c
.
execHeaderTempContent
content
+=
formatExecContent
(
c
.
actionInfos
,
c
.
ClsName
)
fileName
:=
fmt
.
Sprintf
(
"%s/executor/exec.go"
,
c
.
OutputPath
)
_
,
err
:=
util
.
WriteStringToFile
(
fileName
,
content
)
if
err
!=
nil
{
mlog
.
Error
(
fmt
.
Sprintf
(
"Write to file %s failed. error %q"
,
fileName
,
err
))
return
err
}
return
nil
}
func
(
c
*
CreateDappSourceTask
)
createExecLocalFile
()
error
{
content
:=
c
.
execHeaderTempContent
content
+=
formatExecLocalContent
(
c
.
actionInfos
,
c
.
ClsName
)
fileName
:=
fmt
.
Sprintf
(
"%s/executor/exec_local.go"
,
c
.
OutputPath
)
_
,
err
:=
util
.
WriteStringToFile
(
fileName
,
content
)
if
err
!=
nil
{
mlog
.
Error
(
fmt
.
Sprintf
(
"Write to file %s failed. error %q"
,
fileName
,
err
))
return
err
}
return
nil
}
func
(
c
*
CreateDappSourceTask
)
createExecDelLocalFile
()
error
{
content
:=
c
.
execHeaderTempContent
content
+=
formatExecDelLocalContent
(
c
.
actionInfos
,
c
.
ClsName
)
fileName
:=
fmt
.
Sprintf
(
"%s/executor/exec_del_local.go"
,
c
.
OutputPath
)
_
,
err
:=
util
.
WriteStringToFile
(
fileName
,
content
)
if
err
!=
nil
{
mlog
.
Error
(
fmt
.
Sprintf
(
"Write to file %s failed. error %q"
,
fileName
,
err
))
return
err
}
return
nil
}
/**
createTypeExecuteFile 根据自己的需求,创建一个types中与执行器同名的Type对照关系
需要处理的内容:
1. 定义TyLogXXXX的常量,规则是 TyLog + 变量名称
2. 定义类型常量,规则是 ActionName + 变量名称
3. 实现GetLogMap()
4. 实现GetTypeMap()
*/
func
(
c
*
CreateDappSourceTask
)
createTypeExecuteFile
()
error
{
logText
:=
buildActionLogTypeText
(
c
.
actionInfos
,
c
.
ExecuteName
)
// ${TYLOGACTIONTYPE}
actionIDText
:=
buildActionIDText
(
c
.
actionInfos
,
c
.
ExecuteName
)
// ${ACTIONIDTEXT}
logMapText
:=
buildLogMapText
()
// ${LOGMAPTEXT}
typeMapText
:=
buildTypeMapText
(
c
.
actionInfos
,
c
.
ExecuteName
)
// ${TYPEMAPTEXT}
replacePairs
:=
[]
struct
{
src
string
dst
string
}{
{
src
:
types
.
TagTyLogActionType
,
dst
:
logText
},
{
src
:
types
.
TagActionIDText
,
dst
:
actionIDText
},
{
src
:
types
.
TagLogMapText
,
dst
:
logMapText
},
{
src
:
types
.
TagTypeMapText
,
dst
:
typeMapText
},
{
src
:
types
.
TagTypeName
,
dst
:
c
.
TypeName
},
{
src
:
types
.
TagExecName
,
dst
:
c
.
ExecuteName
},
{
src
:
types
.
TagActionName
,
dst
:
c
.
ActionName
},
}
bcontent
,
err
:=
util
.
ReadFile
(
c
.
TypeTempFile
)
if
err
!=
nil
{
return
err
}
content
:=
string
(
bcontent
)
for
_
,
pair
:=
range
replacePairs
{
content
=
strings
.
Replace
(
content
,
pair
.
src
,
pair
.
dst
,
-
1
)
}
fileName
:=
fmt
.
Sprintf
(
"%s%s.go"
,
c
.
TypeOutputFile
,
c
.
ClsName
)
util
.
DeleteFile
(
fileName
)
_
,
err
=
util
.
WriteStringToFile
(
fileName
,
content
)
return
err
}
vendor/github.com/33cn/chain33/cmd/tools/tasks/tasks_test.go
View file @
7c5ce435
...
...
@@ -3,18 +3,3 @@
// license that can be found in the LICENSE file.
package
tasks
import
(
"testing"
"github.com/stretchr/testify/assert"
"github.com/33cn/chain33/cmd/tools/util"
)
func
TestReplaceTarget
(
t
*
testing
.
T
)
{
fileName
:=
"../config/template/executor/${CLASSNAME}.go.tmp"
bcontent
,
err
:=
util
.
ReadFile
(
fileName
)
assert
.
NoError
(
t
,
err
)
t
.
Log
(
string
(
bcontent
))
}
vendor/github.com/33cn/chain33/p2p/downloadblocks.go
View file @
7c5ce435
...
...
@@ -12,6 +12,7 @@ import (
"sync"
"sync/atomic"
"time"
//"time"
pb
"github.com/33cn/chain33/types"
...
...
@@ -61,7 +62,7 @@ func NewDownloadJob(p2pcli *Cli, peers []*Peer) *DownloadJob {
job
.
busyPeer
=
make
(
map
[
string
]
*
peerJob
)
job
.
downloadPeers
=
peers
job
.
MaxJob
=
2
job
.
MaxJob
=
5
if
len
(
peers
)
<
5
{
job
.
MaxJob
=
10
}
...
...
vendor/github.com/33cn/chain33/p2p/node.go
View file @
7c5ce435
...
...
@@ -93,13 +93,15 @@ func NewNode(cfg *types.P2P) (*Node, error) {
}
seeds
:=
MainNetSeeds
if
types
.
IsTestNet
()
{
seeds
=
TestNetSeeds
}
if
cfg
.
InnerSeedEnable
{
seeds
:=
MainNetSeeds
if
types
.
IsTestNet
()
{
seeds
=
TestNetSeeds
}
for
_
,
seed
:=
range
seeds
{
node
.
innerSeeds
.
Store
(
seed
,
"inner"
)
for
_
,
seed
:=
range
seeds
{
node
.
innerSeeds
.
Store
(
seed
,
"inner"
)
}
}
for
_
,
seed
:=
range
cfg
.
Seeds
{
...
...
vendor/github.com/33cn/chain33/rpc/client.go
View file @
7c5ce435
...
...
@@ -160,26 +160,6 @@ func decodeTx(hexstr string) (*types.Transaction, error) {
return
&
tx
,
nil
}
// SendRawTransaction send rawtransaction by p2p
func
(
c
*
channelClient
)
SendRawTransaction
(
param
*
types
.
SignedTx
)
(
*
types
.
Reply
,
error
)
{
if
param
==
nil
{
err
:=
types
.
ErrInvalidParam
log
.
Error
(
"SendRawTransaction"
,
"Error"
,
err
)
return
nil
,
err
}
var
tx
types
.
Transaction
err
:=
types
.
Decode
(
param
.
GetUnsign
(),
&
tx
)
if
err
==
nil
{
tx
.
Signature
=
&
types
.
Signature
{
Ty
:
param
.
GetTy
(),
Pubkey
:
param
.
GetPubkey
(),
Signature
:
param
.
GetSign
(),
}
return
c
.
SendTx
(
&
tx
)
}
return
nil
,
err
}
// GetAddrOverview get overview of address
func
(
c
*
channelClient
)
GetAddrOverview
(
parm
*
types
.
ReqAddr
)
(
*
types
.
AddrOverview
,
error
)
{
err
:=
address
.
CheckAddress
(
parm
.
Addr
)
...
...
vendor/github.com/33cn/chain33/rpc/client_test.go
View file @
7c5ce435
...
...
@@ -172,54 +172,6 @@ func TestChannelClient_CreateRawTransaction(t *testing.T) {
testCreateRawTransactionCoinWithdraw
(
t
)
}
func
testSendRawTransactionNil
(
t
*
testing
.
T
)
{
client
:=
newTestChannelClient
()
_
,
err
:=
client
.
SendRawTransaction
(
nil
)
assert
.
Equal
(
t
,
types
.
ErrInvalidParam
,
err
)
}
func
testSendRawTransactionErr
(
t
*
testing
.
T
)
{
var
param
=
types
.
SignedTx
{
Unsign
:
[]
byte
(
"123"
),
Sign
:
[]
byte
(
"123"
),
Pubkey
:
[]
byte
(
"123"
),
Ty
:
1
,
}
client
:=
newTestChannelClient
()
_
,
err
:=
client
.
SendRawTransaction
(
&
param
)
assert
.
NotEmpty
(
t
,
err
)
}
func
testSendRawTransactionOk
(
t
*
testing
.
T
)
{
transfer
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
types
.
ExecName
(
"ticket"
)),
}
payload
:=
types
.
Encode
(
transfer
)
api
:=
new
(
mocks
.
QueueProtocolAPI
)
client
:=
&
channelClient
{
QueueProtocolAPI
:
api
,
}
api
.
On
(
"SendTx"
,
mock
.
Anything
)
.
Return
(
nil
,
nil
)
var
param
=
types
.
SignedTx
{
Unsign
:
payload
,
Sign
:
[]
byte
(
"123"
),
Pubkey
:
[]
byte
(
"123"
),
Ty
:
1
,
}
_
,
err
:=
client
.
SendRawTransaction
(
&
param
)
assert
.
Nil
(
t
,
err
)
}
func
TestChannelClient_SendRawTransaction
(
t
*
testing
.
T
)
{
testSendRawTransactionNil
(
t
)
testSendRawTransactionOk
(
t
)
testSendRawTransactionErr
(
t
)
}
func
testChannelClientGetAddrOverviewNil
(
t
*
testing
.
T
)
{
parm
:=
&
types
.
ReqAddr
{
Addr
:
"abcde"
,
...
...
vendor/github.com/33cn/chain33/rpc/grpchandler.go
View file @
7c5ce435
...
...
@@ -80,11 +80,6 @@ func (g *Grpc) CreateRawTxGroup(ctx context.Context, in *pb.CreateTransactionGro
return
&
pb
.
UnsignTx
{
Data
:
reply
},
nil
}
// SendRawTransaction send rawtransaction
func
(
g
*
Grpc
)
SendRawTransaction
(
ctx
context
.
Context
,
in
*
pb
.
SignedTx
)
(
*
pb
.
Reply
,
error
)
{
return
g
.
cli
.
SendRawTransaction
(
in
)
}
// QueryTransaction query transaction by grpc
func
(
g
*
Grpc
)
QueryTransaction
(
ctx
context
.
Context
,
in
*
pb
.
ReqHash
)
(
*
pb
.
TransactionDetail
,
error
)
{
return
g
.
cli
.
QueryTx
(
in
)
...
...
vendor/github.com/33cn/chain33/rpc/grpchandler_test.go
View file @
7c5ce435
...
...
@@ -988,17 +988,6 @@ func TestGetLastHeader(t *testing.T) {
// testCreateRawTransactionOk(t)
//}
//func testSendRawTransactionReject(t *testing.T) {
// var in *pb.SignedTx
//
// _, err := g.SendRawTransaction(getNokCtx(), in)
// assert.EqualError(t, err, "reject", "the erros should be reject")
//}
//func TestSendRawTransaction(t *testing.T) {
// testSendRawTransactionReject(t)
//}
//func testQueryTransactionReject(t *testing.T) {
// var in *pb.ReqHash
//
...
...
@@ -1102,24 +1091,6 @@ func TestGrpc_CreateRawTxGroup(t *testing.T) {
assert
.
Equal
(
t
,
types
.
ErrTxGroupCountLessThanTwo
,
err
)
}
func
TestGrpc_SendRawTransaction
(
t
*
testing
.
T
)
{
transfer
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
types
.
ExecName
(
"ticket"
)),
}
payload
:=
types
.
Encode
(
transfer
)
qapi
.
On
(
"SendTx"
,
mock
.
Anything
)
.
Return
(
nil
,
nil
)
var
param
=
&
types
.
SignedTx
{
Unsign
:
payload
,
Sign
:
[]
byte
(
"123"
),
Pubkey
:
[]
byte
(
"123"
),
Ty
:
1
,
}
_
,
err
:=
g
.
SendRawTransaction
(
getOkCtx
(),
param
)
assert
.
NoError
(
t
,
err
)
}
func
TestGrpc_GetAddrOverview
(
t
*
testing
.
T
)
{
_
,
err
:=
g
.
GetAddrOverview
(
getOkCtx
(),
&
types
.
ReqAddr
{})
assert
.
Equal
(
t
,
err
,
types
.
ErrInvalidAddress
)
...
...
vendor/github.com/33cn/chain33/rpc/jrpchandler.go
View file @
7c5ce435
...
...
@@ -8,7 +8,6 @@ import (
"context"
"encoding/hex"
"encoding/json"
"fmt"
"time"
"github.com/33cn/chain33/common"
...
...
@@ -83,36 +82,6 @@ func (c *Chain33) CreateNoBalanceTransaction(in *types.NoBalanceTx, result *stri
return
nil
}
// SendRawTransaction send rawtransacion
func
(
c
*
Chain33
)
SendRawTransaction
(
in
rpctypes
.
SignedTx
,
result
*
interface
{})
error
{
var
stx
types
.
SignedTx
var
err
error
stx
.
Pubkey
,
err
=
hex
.
DecodeString
(
in
.
Pubkey
)
if
err
!=
nil
{
return
err
}
stx
.
Sign
,
err
=
hex
.
DecodeString
(
in
.
Sign
)
if
err
!=
nil
{
return
err
}
stx
.
Unsign
,
err
=
hex
.
DecodeString
(
in
.
Unsign
)
if
err
!=
nil
{
return
err
}
stx
.
Ty
=
in
.
Ty
reply
,
err
:=
c
.
cli
.
SendRawTransaction
(
&
stx
)
if
err
!=
nil
{
return
err
}
if
reply
.
IsOk
{
*
result
=
"0x"
+
hex
.
EncodeToString
(
reply
.
Msg
)
return
nil
}
return
fmt
.
Errorf
(
string
(
reply
.
Msg
))
}
// SendTransaction send transaction
func
(
c
*
Chain33
)
SendTransaction
(
in
rpctypes
.
RawParm
,
result
*
interface
{})
error
{
var
parm
types
.
Transaction
...
...
vendor/github.com/33cn/chain33/rpc/jrpchandler_test.go
View file @
7c5ce435
...
...
@@ -460,100 +460,6 @@ func TestChain33_CreateTxGroup(t *testing.T) {
assert
.
Nil
(
t
,
err
)
}
func
TestChain33_SendRawTransaction
(
t
*
testing
.
T
)
{
api
:=
new
(
mocks
.
QueueProtocolAPI
)
// var result interface{}
api
.
On
(
"SendTx"
,
mock
.
Anything
)
.
Return
()
testChain33
:=
newTestChain33
(
api
)
var
testResult
interface
{}
signedTx
:=
rpctypes
.
SignedTx
{
Unsign
:
"123"
,
Sign
:
"123"
,
Pubkey
:
"123"
,
Ty
:
1
,
}
err
:=
testChain33
.
SendRawTransaction
(
signedTx
,
&
testResult
)
t
.
Log
(
err
)
assert
.
Nil
(
t
,
testResult
)
assert
.
NotNil
(
t
,
err
)
// api.Called(1)
// mock.AssertExpectationsForObjects(t, api)
}
func
TestChain33_SendRawTransactionSignError
(
t
*
testing
.
T
)
{
api
:=
new
(
mocks
.
QueueProtocolAPI
)
// var result interface{}
api
.
On
(
"SendTx"
,
mock
.
Anything
)
.
Return
()
testChain33
:=
newTestChain33
(
api
)
var
testResult
interface
{}
src
:=
[]
byte
(
"123"
)
pubkey
:=
make
([]
byte
,
hex
.
EncodedLen
(
len
(
src
)))
hex
.
Encode
(
pubkey
,
src
)
signedTx
:=
rpctypes
.
SignedTx
{
Unsign
:
"123"
,
Sign
:
"123"
,
Pubkey
:
string
(
pubkey
),
Ty
:
1
,
}
err
:=
testChain33
.
SendRawTransaction
(
signedTx
,
&
testResult
)
t
.
Log
(
err
)
assert
.
Nil
(
t
,
testResult
)
assert
.
NotNil
(
t
,
err
)
// api.Called(1)
// mock.AssertExpectationsForObjects(t, api)
}
func
TestChain33_SendRawTransactionUnsignError
(
t
*
testing
.
T
)
{
reply
:=
&
types
.
Reply
{
IsOk
:
true
}
api
:=
new
(
mocks
.
QueueProtocolAPI
)
// var result interface{}
api
.
On
(
"SendTx"
,
mock
.
Anything
)
.
Return
(
reply
,
nil
)
testChain33
:=
newTestChain33
(
api
)
var
testResult
interface
{}
src
:=
[]
byte
(
"123"
)
pubkey
:=
make
([]
byte
,
hex
.
EncodedLen
(
len
(
src
)))
signkey
:=
make
([]
byte
,
hex
.
EncodedLen
(
len
(
src
)))
hex
.
Encode
(
pubkey
,
src
)
hex
.
Encode
(
signkey
,
src
)
signedTx
:=
rpctypes
.
SignedTx
{
Unsign
:
"123"
,
Sign
:
string
(
signkey
),
Pubkey
:
string
(
pubkey
),
Ty
:
1
,
}
err
:=
testChain33
.
SendRawTransaction
(
signedTx
,
&
testResult
)
t
.
Log
(
err
)
assert
.
Nil
(
t
,
testResult
)
assert
.
NotNil
(
t
,
err
)
tx
:=
&
types
.
Transaction
{
To
:
"to"
,
}
txByte
:=
types
.
Encode
(
tx
)
unsign
:=
make
([]
byte
,
hex
.
EncodedLen
(
len
(
txByte
)))
hex
.
Encode
(
unsign
,
txByte
)
signedTx
=
rpctypes
.
SignedTx
{
Unsign
:
string
(
unsign
),
Sign
:
string
(
signkey
),
Pubkey
:
string
(
pubkey
),
Ty
:
1
,
}
err
=
testChain33
.
SendRawTransaction
(
signedTx
,
&
testResult
)
t
.
Log
(
testResult
)
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
"0x"
,
testResult
)
//assert.NotNil(t, err)
// api.Called(1)
// mock.AssertExpectationsForObjects(t, api)
}
func
TestChain33_SendTransaction
(
t
*
testing
.
T
)
{
if
types
.
IsPara
()
{
t
.
Skip
()
...
...
vendor/github.com/33cn/chain33/system/store/mavl/db/tree.go
View file @
7c5ce435
...
...
@@ -14,6 +14,7 @@ import (
"github.com/33cn/chain33/common"
dbm
"github.com/33cn/chain33/common/db"
log
"github.com/33cn/chain33/common/log/log15"
ty
"github.com/33cn/chain33/system/store/mavl/db/types"
"github.com/33cn/chain33/types"
farm
"github.com/dgryski/go-farm"
"github.com/golang/protobuf/proto"
...
...
@@ -569,6 +570,13 @@ func updateGlobalMemTree(node *Node) {
Size
:
node
.
size
,
}
if
node
.
height
==
0
{
if
bytes
.
HasPrefix
(
node
.
key
,
ty
.
TicketPrefix
)
{
ticket
:=
&
ty
.
Ticket
{}
err
:=
proto
.
Unmarshal
(
node
.
value
,
ticket
)
if
err
==
nil
&&
ticket
.
Status
==
ty
.
StatusCloseTicket
{
//ticket为close状态下不做存储
return
}
}
memN
.
data
=
make
([][]
byte
,
4
)
memN
.
data
[
3
]
=
node
.
value
}
else
{
...
...
@@ -594,6 +602,13 @@ func updateLocalMemTree(t *Tree, node *Node) {
Size
:
node
.
size
,
}
if
node
.
height
==
0
{
if
bytes
.
HasPrefix
(
node
.
key
,
ty
.
TicketPrefix
)
{
ticket
:=
&
ty
.
Ticket
{}
err
:=
proto
.
Unmarshal
(
node
.
value
,
ticket
)
if
err
==
nil
&&
ticket
.
Status
==
ty
.
StatusCloseTicket
{
//ticket为close状态下不做存储
return
}
}
memN
.
data
=
make
([][]
byte
,
4
)
memN
.
data
[
3
]
=
node
.
value
}
else
{
...
...
vendor/github.com/33cn/chain33/system/store/mavl/db/types/ticket.go
0 → 100755
View file @
7c5ce435
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
types
var
(
// TicketPrefix ticket prefix
TicketPrefix
=
[]
byte
(
"mavl-ticket-"
)
)
const
(
// StatusNewTicket new ticket status
StatusNewTicket
=
1
// StatusMinerTicket Miner ticket status
StatusMinerTicket
=
2
// StatusCloseTicket Close ticket status
StatusCloseTicket
=
3
)
vendor/github.com/33cn/chain33/system/store/mavl/db/types/ticket.pb.go
0 → 100644
View file @
7c5ce435
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ticket.proto
package
types
import
(
context
"context"
fmt
"fmt"
math
"math"
types
"github.com/33cn/chain33/types"
proto
"github.com/golang/protobuf/proto"
grpc
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
_
=
fmt
.
Errorf
var
_
=
math
.
Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const
_
=
proto
.
ProtoPackageIsVersion2
// please upgrade the proto package
type
Ticket
struct
{
TicketId
string
`protobuf:"bytes,1,opt,name=ticketId,proto3" json:"ticketId,omitempty"`
// 0 -> 未成熟 1 -> 可挖矿 2 -> 已挖成功 3-> 已关闭
Status
int32
`protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
// genesis 创建的私钥比较特殊
IsGenesis
bool
`protobuf:"varint,3,opt,name=isGenesis,proto3" json:"isGenesis,omitempty"`
//创建时间
CreateTime
int64
`protobuf:"varint,4,opt,name=createTime,proto3" json:"createTime,omitempty"`
//挖矿时间
MinerTime
int64
`protobuf:"varint,5,opt,name=minerTime,proto3" json:"minerTime,omitempty"`
//挖到的币的数目
MinerValue
int64
`protobuf:"varint,8,opt,name=minerValue,proto3" json:"minerValue,omitempty"`
MinerAddress
string
`protobuf:"bytes,6,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"`
// return wallet
ReturnAddress
string
`protobuf:"bytes,7,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
Ticket
)
Reset
()
{
*
m
=
Ticket
{}
}
func
(
m
*
Ticket
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Ticket
)
ProtoMessage
()
{}
func
(
*
Ticket
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
0
}
}
func
(
m
*
Ticket
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_Ticket
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
Ticket
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_Ticket
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
Ticket
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Ticket
.
Merge
(
m
,
src
)
}
func
(
m
*
Ticket
)
XXX_Size
()
int
{
return
xxx_messageInfo_Ticket
.
Size
(
m
)
}
func
(
m
*
Ticket
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_Ticket
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_Ticket
proto
.
InternalMessageInfo
func
(
m
*
Ticket
)
GetTicketId
()
string
{
if
m
!=
nil
{
return
m
.
TicketId
}
return
""
}
func
(
m
*
Ticket
)
GetStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Status
}
return
0
}
func
(
m
*
Ticket
)
GetIsGenesis
()
bool
{
if
m
!=
nil
{
return
m
.
IsGenesis
}
return
false
}
func
(
m
*
Ticket
)
GetCreateTime
()
int64
{
if
m
!=
nil
{
return
m
.
CreateTime
}
return
0
}
func
(
m
*
Ticket
)
GetMinerTime
()
int64
{
if
m
!=
nil
{
return
m
.
MinerTime
}
return
0
}
func
(
m
*
Ticket
)
GetMinerValue
()
int64
{
if
m
!=
nil
{
return
m
.
MinerValue
}
return
0
}
func
(
m
*
Ticket
)
GetMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
MinerAddress
}
return
""
}
func
(
m
*
Ticket
)
GetReturnAddress
()
string
{
if
m
!=
nil
{
return
m
.
ReturnAddress
}
return
""
}
// message for execs.ticket
type
TicketAction
struct
{
// Types that are valid to be assigned to Value:
// *TicketAction_Tbind
// *TicketAction_Topen
// *TicketAction_Genesis
// *TicketAction_Tclose
// *TicketAction_Miner
Value
isTicketAction_Value
`protobuf_oneof:"value"`
Ty
int32
`protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketAction
)
Reset
()
{
*
m
=
TicketAction
{}
}
func
(
m
*
TicketAction
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketAction
)
ProtoMessage
()
{}
func
(
*
TicketAction
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
1
}
}
func
(
m
*
TicketAction
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketAction
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketAction
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketAction
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketAction
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketAction
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketAction
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketAction
.
Size
(
m
)
}
func
(
m
*
TicketAction
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketAction
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketAction
proto
.
InternalMessageInfo
type
isTicketAction_Value
interface
{
isTicketAction_Value
()
}
type
TicketAction_Tbind
struct
{
Tbind
*
TicketBind
`protobuf:"bytes,5,opt,name=tbind,proto3,oneof"`
}
type
TicketAction_Topen
struct
{
Topen
*
TicketOpen
`protobuf:"bytes,1,opt,name=topen,proto3,oneof"`
}
type
TicketAction_Genesis
struct
{
Genesis
*
TicketGenesis
`protobuf:"bytes,2,opt,name=genesis,proto3,oneof"`
}
type
TicketAction_Tclose
struct
{
Tclose
*
TicketClose
`protobuf:"bytes,3,opt,name=tclose,proto3,oneof"`
}
type
TicketAction_Miner
struct
{
Miner
*
TicketMiner
`protobuf:"bytes,4,opt,name=miner,proto3,oneof"`
}
func
(
*
TicketAction_Tbind
)
isTicketAction_Value
()
{}
func
(
*
TicketAction_Topen
)
isTicketAction_Value
()
{}
func
(
*
TicketAction_Genesis
)
isTicketAction_Value
()
{}
func
(
*
TicketAction_Tclose
)
isTicketAction_Value
()
{}
func
(
*
TicketAction_Miner
)
isTicketAction_Value
()
{}
func
(
m
*
TicketAction
)
GetValue
()
isTicketAction_Value
{
if
m
!=
nil
{
return
m
.
Value
}
return
nil
}
func
(
m
*
TicketAction
)
GetTbind
()
*
TicketBind
{
if
x
,
ok
:=
m
.
GetValue
()
.
(
*
TicketAction_Tbind
);
ok
{
return
x
.
Tbind
}
return
nil
}
func
(
m
*
TicketAction
)
GetTopen
()
*
TicketOpen
{
if
x
,
ok
:=
m
.
GetValue
()
.
(
*
TicketAction_Topen
);
ok
{
return
x
.
Topen
}
return
nil
}
func
(
m
*
TicketAction
)
GetGenesis
()
*
TicketGenesis
{
if
x
,
ok
:=
m
.
GetValue
()
.
(
*
TicketAction_Genesis
);
ok
{
return
x
.
Genesis
}
return
nil
}
func
(
m
*
TicketAction
)
GetTclose
()
*
TicketClose
{
if
x
,
ok
:=
m
.
GetValue
()
.
(
*
TicketAction_Tclose
);
ok
{
return
x
.
Tclose
}
return
nil
}
func
(
m
*
TicketAction
)
GetMiner
()
*
TicketMiner
{
if
x
,
ok
:=
m
.
GetValue
()
.
(
*
TicketAction_Miner
);
ok
{
return
x
.
Miner
}
return
nil
}
func
(
m
*
TicketAction
)
GetTy
()
int32
{
if
m
!=
nil
{
return
m
.
Ty
}
return
0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func
(
*
TicketAction
)
XXX_OneofFuncs
()
(
func
(
msg
proto
.
Message
,
b
*
proto
.
Buffer
)
error
,
func
(
msg
proto
.
Message
,
tag
,
wire
int
,
b
*
proto
.
Buffer
)
(
bool
,
error
),
func
(
msg
proto
.
Message
)
(
n
int
),
[]
interface
{})
{
return
_TicketAction_OneofMarshaler
,
_TicketAction_OneofUnmarshaler
,
_TicketAction_OneofSizer
,
[]
interface
{}{
(
*
TicketAction_Tbind
)(
nil
),
(
*
TicketAction_Topen
)(
nil
),
(
*
TicketAction_Genesis
)(
nil
),
(
*
TicketAction_Tclose
)(
nil
),
(
*
TicketAction_Miner
)(
nil
),
}
}
func
_TicketAction_OneofMarshaler
(
msg
proto
.
Message
,
b
*
proto
.
Buffer
)
error
{
m
:=
msg
.
(
*
TicketAction
)
// value
switch
x
:=
m
.
Value
.
(
type
)
{
case
*
TicketAction_Tbind
:
b
.
EncodeVarint
(
5
<<
3
|
proto
.
WireBytes
)
if
err
:=
b
.
EncodeMessage
(
x
.
Tbind
);
err
!=
nil
{
return
err
}
case
*
TicketAction_Topen
:
b
.
EncodeVarint
(
1
<<
3
|
proto
.
WireBytes
)
if
err
:=
b
.
EncodeMessage
(
x
.
Topen
);
err
!=
nil
{
return
err
}
case
*
TicketAction_Genesis
:
b
.
EncodeVarint
(
2
<<
3
|
proto
.
WireBytes
)
if
err
:=
b
.
EncodeMessage
(
x
.
Genesis
);
err
!=
nil
{
return
err
}
case
*
TicketAction_Tclose
:
b
.
EncodeVarint
(
3
<<
3
|
proto
.
WireBytes
)
if
err
:=
b
.
EncodeMessage
(
x
.
Tclose
);
err
!=
nil
{
return
err
}
case
*
TicketAction_Miner
:
b
.
EncodeVarint
(
4
<<
3
|
proto
.
WireBytes
)
if
err
:=
b
.
EncodeMessage
(
x
.
Miner
);
err
!=
nil
{
return
err
}
case
nil
:
default
:
return
fmt
.
Errorf
(
"TicketAction.Value has unexpected type %T"
,
x
)
}
return
nil
}
func
_TicketAction_OneofUnmarshaler
(
msg
proto
.
Message
,
tag
,
wire
int
,
b
*
proto
.
Buffer
)
(
bool
,
error
)
{
m
:=
msg
.
(
*
TicketAction
)
switch
tag
{
case
5
:
// value.tbind
if
wire
!=
proto
.
WireBytes
{
return
true
,
proto
.
ErrInternalBadWireType
}
msg
:=
new
(
TicketBind
)
err
:=
b
.
DecodeMessage
(
msg
)
m
.
Value
=
&
TicketAction_Tbind
{
msg
}
return
true
,
err
case
1
:
// value.topen
if
wire
!=
proto
.
WireBytes
{
return
true
,
proto
.
ErrInternalBadWireType
}
msg
:=
new
(
TicketOpen
)
err
:=
b
.
DecodeMessage
(
msg
)
m
.
Value
=
&
TicketAction_Topen
{
msg
}
return
true
,
err
case
2
:
// value.genesis
if
wire
!=
proto
.
WireBytes
{
return
true
,
proto
.
ErrInternalBadWireType
}
msg
:=
new
(
TicketGenesis
)
err
:=
b
.
DecodeMessage
(
msg
)
m
.
Value
=
&
TicketAction_Genesis
{
msg
}
return
true
,
err
case
3
:
// value.tclose
if
wire
!=
proto
.
WireBytes
{
return
true
,
proto
.
ErrInternalBadWireType
}
msg
:=
new
(
TicketClose
)
err
:=
b
.
DecodeMessage
(
msg
)
m
.
Value
=
&
TicketAction_Tclose
{
msg
}
return
true
,
err
case
4
:
// value.miner
if
wire
!=
proto
.
WireBytes
{
return
true
,
proto
.
ErrInternalBadWireType
}
msg
:=
new
(
TicketMiner
)
err
:=
b
.
DecodeMessage
(
msg
)
m
.
Value
=
&
TicketAction_Miner
{
msg
}
return
true
,
err
default
:
return
false
,
nil
}
}
func
_TicketAction_OneofSizer
(
msg
proto
.
Message
)
(
n
int
)
{
m
:=
msg
.
(
*
TicketAction
)
// value
switch
x
:=
m
.
Value
.
(
type
)
{
case
*
TicketAction_Tbind
:
s
:=
proto
.
Size
(
x
.
Tbind
)
n
+=
1
// tag and wire
n
+=
proto
.
SizeVarint
(
uint64
(
s
))
n
+=
s
case
*
TicketAction_Topen
:
s
:=
proto
.
Size
(
x
.
Topen
)
n
+=
1
// tag and wire
n
+=
proto
.
SizeVarint
(
uint64
(
s
))
n
+=
s
case
*
TicketAction_Genesis
:
s
:=
proto
.
Size
(
x
.
Genesis
)
n
+=
1
// tag and wire
n
+=
proto
.
SizeVarint
(
uint64
(
s
))
n
+=
s
case
*
TicketAction_Tclose
:
s
:=
proto
.
Size
(
x
.
Tclose
)
n
+=
1
// tag and wire
n
+=
proto
.
SizeVarint
(
uint64
(
s
))
n
+=
s
case
*
TicketAction_Miner
:
s
:=
proto
.
Size
(
x
.
Miner
)
n
+=
1
// tag and wire
n
+=
proto
.
SizeVarint
(
uint64
(
s
))
n
+=
s
case
nil
:
default
:
panic
(
fmt
.
Sprintf
(
"proto: unexpected type %T in oneof"
,
x
))
}
return
n
}
type
TicketMiner
struct
{
Bits
uint32
`protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
Reward
int64
`protobuf:"varint,2,opt,name=reward,proto3" json:"reward,omitempty"`
TicketId
string
`protobuf:"bytes,3,opt,name=ticketId,proto3" json:"ticketId,omitempty"`
Modify
[]
byte
`protobuf:"bytes,4,opt,name=modify,proto3" json:"modify,omitempty"`
//挖到区块时公开
PrivHash
[]
byte
`protobuf:"bytes,5,opt,name=privHash,proto3" json:"privHash,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketMiner
)
Reset
()
{
*
m
=
TicketMiner
{}
}
func
(
m
*
TicketMiner
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketMiner
)
ProtoMessage
()
{}
func
(
*
TicketMiner
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
2
}
}
func
(
m
*
TicketMiner
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketMiner
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketMiner
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketMiner
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketMiner
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketMiner
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketMiner
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketMiner
.
Size
(
m
)
}
func
(
m
*
TicketMiner
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketMiner
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketMiner
proto
.
InternalMessageInfo
func
(
m
*
TicketMiner
)
GetBits
()
uint32
{
if
m
!=
nil
{
return
m
.
Bits
}
return
0
}
func
(
m
*
TicketMiner
)
GetReward
()
int64
{
if
m
!=
nil
{
return
m
.
Reward
}
return
0
}
func
(
m
*
TicketMiner
)
GetTicketId
()
string
{
if
m
!=
nil
{
return
m
.
TicketId
}
return
""
}
func
(
m
*
TicketMiner
)
GetModify
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Modify
}
return
nil
}
func
(
m
*
TicketMiner
)
GetPrivHash
()
[]
byte
{
if
m
!=
nil
{
return
m
.
PrivHash
}
return
nil
}
type
TicketMinerOld
struct
{
Bits
uint32
`protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
Reward
int64
`protobuf:"varint,2,opt,name=reward,proto3" json:"reward,omitempty"`
TicketId
string
`protobuf:"bytes,3,opt,name=ticketId,proto3" json:"ticketId,omitempty"`
Modify
[]
byte
`protobuf:"bytes,4,opt,name=modify,proto3" json:"modify,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketMinerOld
)
Reset
()
{
*
m
=
TicketMinerOld
{}
}
func
(
m
*
TicketMinerOld
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketMinerOld
)
ProtoMessage
()
{}
func
(
*
TicketMinerOld
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
3
}
}
func
(
m
*
TicketMinerOld
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketMinerOld
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketMinerOld
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketMinerOld
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketMinerOld
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketMinerOld
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketMinerOld
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketMinerOld
.
Size
(
m
)
}
func
(
m
*
TicketMinerOld
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketMinerOld
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketMinerOld
proto
.
InternalMessageInfo
func
(
m
*
TicketMinerOld
)
GetBits
()
uint32
{
if
m
!=
nil
{
return
m
.
Bits
}
return
0
}
func
(
m
*
TicketMinerOld
)
GetReward
()
int64
{
if
m
!=
nil
{
return
m
.
Reward
}
return
0
}
func
(
m
*
TicketMinerOld
)
GetTicketId
()
string
{
if
m
!=
nil
{
return
m
.
TicketId
}
return
""
}
func
(
m
*
TicketMinerOld
)
GetModify
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Modify
}
return
nil
}
type
MinerFlag
struct
{
Flag
int32
`protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"`
Reserve
int64
`protobuf:"varint,2,opt,name=reserve,proto3" json:"reserve,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
MinerFlag
)
Reset
()
{
*
m
=
MinerFlag
{}
}
func
(
m
*
MinerFlag
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
MinerFlag
)
ProtoMessage
()
{}
func
(
*
MinerFlag
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
4
}
}
func
(
m
*
MinerFlag
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_MinerFlag
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
MinerFlag
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_MinerFlag
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
MinerFlag
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_MinerFlag
.
Merge
(
m
,
src
)
}
func
(
m
*
MinerFlag
)
XXX_Size
()
int
{
return
xxx_messageInfo_MinerFlag
.
Size
(
m
)
}
func
(
m
*
MinerFlag
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_MinerFlag
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_MinerFlag
proto
.
InternalMessageInfo
func
(
m
*
MinerFlag
)
GetFlag
()
int32
{
if
m
!=
nil
{
return
m
.
Flag
}
return
0
}
func
(
m
*
MinerFlag
)
GetReserve
()
int64
{
if
m
!=
nil
{
return
m
.
Reserve
}
return
0
}
type
TicketBind
struct
{
MinerAddress
string
`protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"`
ReturnAddress
string
`protobuf:"bytes,2,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketBind
)
Reset
()
{
*
m
=
TicketBind
{}
}
func
(
m
*
TicketBind
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketBind
)
ProtoMessage
()
{}
func
(
*
TicketBind
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
5
}
}
func
(
m
*
TicketBind
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketBind
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketBind
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketBind
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketBind
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketBind
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketBind
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketBind
.
Size
(
m
)
}
func
(
m
*
TicketBind
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketBind
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketBind
proto
.
InternalMessageInfo
func
(
m
*
TicketBind
)
GetMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
MinerAddress
}
return
""
}
func
(
m
*
TicketBind
)
GetReturnAddress
()
string
{
if
m
!=
nil
{
return
m
.
ReturnAddress
}
return
""
}
type
TicketOpen
struct
{
//用户挖矿的ticket 地址
MinerAddress
string
`protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"`
//购买ticket的数目
Count
int32
`protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
//币实际存储的地址
ReturnAddress
string
`protobuf:"bytes,3,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"`
//随机种子
RandSeed
int64
`protobuf:"varint,4,opt,name=randSeed,proto3" json:"randSeed,omitempty"`
//购买ticket时公开
PubHashes
[][]
byte
`protobuf:"bytes,5,rep,name=pubHashes,proto3" json:"pubHashes,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketOpen
)
Reset
()
{
*
m
=
TicketOpen
{}
}
func
(
m
*
TicketOpen
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketOpen
)
ProtoMessage
()
{}
func
(
*
TicketOpen
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
6
}
}
func
(
m
*
TicketOpen
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketOpen
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketOpen
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketOpen
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketOpen
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketOpen
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketOpen
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketOpen
.
Size
(
m
)
}
func
(
m
*
TicketOpen
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketOpen
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketOpen
proto
.
InternalMessageInfo
func
(
m
*
TicketOpen
)
GetMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
MinerAddress
}
return
""
}
func
(
m
*
TicketOpen
)
GetCount
()
int32
{
if
m
!=
nil
{
return
m
.
Count
}
return
0
}
func
(
m
*
TicketOpen
)
GetReturnAddress
()
string
{
if
m
!=
nil
{
return
m
.
ReturnAddress
}
return
""
}
func
(
m
*
TicketOpen
)
GetRandSeed
()
int64
{
if
m
!=
nil
{
return
m
.
RandSeed
}
return
0
}
func
(
m
*
TicketOpen
)
GetPubHashes
()
[][]
byte
{
if
m
!=
nil
{
return
m
.
PubHashes
}
return
nil
}
type
TicketGenesis
struct
{
MinerAddress
string
`protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"`
ReturnAddress
string
`protobuf:"bytes,2,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"`
Count
int32
`protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketGenesis
)
Reset
()
{
*
m
=
TicketGenesis
{}
}
func
(
m
*
TicketGenesis
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketGenesis
)
ProtoMessage
()
{}
func
(
*
TicketGenesis
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
7
}
}
func
(
m
*
TicketGenesis
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketGenesis
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketGenesis
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketGenesis
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketGenesis
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketGenesis
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketGenesis
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketGenesis
.
Size
(
m
)
}
func
(
m
*
TicketGenesis
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketGenesis
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketGenesis
proto
.
InternalMessageInfo
func
(
m
*
TicketGenesis
)
GetMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
MinerAddress
}
return
""
}
func
(
m
*
TicketGenesis
)
GetReturnAddress
()
string
{
if
m
!=
nil
{
return
m
.
ReturnAddress
}
return
""
}
func
(
m
*
TicketGenesis
)
GetCount
()
int32
{
if
m
!=
nil
{
return
m
.
Count
}
return
0
}
type
TicketClose
struct
{
TicketId
[]
string
`protobuf:"bytes,1,rep,name=ticketId,proto3" json:"ticketId,omitempty"`
MinerAddress
string
`protobuf:"bytes,2,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketClose
)
Reset
()
{
*
m
=
TicketClose
{}
}
func
(
m
*
TicketClose
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketClose
)
ProtoMessage
()
{}
func
(
*
TicketClose
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
8
}
}
func
(
m
*
TicketClose
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketClose
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketClose
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketClose
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketClose
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketClose
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketClose
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketClose
.
Size
(
m
)
}
func
(
m
*
TicketClose
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketClose
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketClose
proto
.
InternalMessageInfo
func
(
m
*
TicketClose
)
GetTicketId
()
[]
string
{
if
m
!=
nil
{
return
m
.
TicketId
}
return
nil
}
func
(
m
*
TicketClose
)
GetMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
MinerAddress
}
return
""
}
type
TicketList
struct
{
Addr
string
`protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
Status
int32
`protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketList
)
Reset
()
{
*
m
=
TicketList
{}
}
func
(
m
*
TicketList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketList
)
ProtoMessage
()
{}
func
(
*
TicketList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
9
}
}
func
(
m
*
TicketList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketList
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketList
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketList
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketList
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketList
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketList
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketList
.
Size
(
m
)
}
func
(
m
*
TicketList
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketList
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketList
proto
.
InternalMessageInfo
func
(
m
*
TicketList
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
return
""
}
func
(
m
*
TicketList
)
GetStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Status
}
return
0
}
type
TicketInfos
struct
{
TicketIds
[]
string
`protobuf:"bytes,1,rep,name=ticketIds,proto3" json:"ticketIds,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TicketInfos
)
Reset
()
{
*
m
=
TicketInfos
{}
}
func
(
m
*
TicketInfos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TicketInfos
)
ProtoMessage
()
{}
func
(
*
TicketInfos
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
10
}
}
func
(
m
*
TicketInfos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_TicketInfos
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
TicketInfos
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_TicketInfos
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
TicketInfos
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_TicketInfos
.
Merge
(
m
,
src
)
}
func
(
m
*
TicketInfos
)
XXX_Size
()
int
{
return
xxx_messageInfo_TicketInfos
.
Size
(
m
)
}
func
(
m
*
TicketInfos
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_TicketInfos
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_TicketInfos
proto
.
InternalMessageInfo
func
(
m
*
TicketInfos
)
GetTicketIds
()
[]
string
{
if
m
!=
nil
{
return
m
.
TicketIds
}
return
nil
}
type
ReplyTicketList
struct
{
Tickets
[]
*
Ticket
`protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReplyTicketList
)
Reset
()
{
*
m
=
ReplyTicketList
{}
}
func
(
m
*
ReplyTicketList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyTicketList
)
ProtoMessage
()
{}
func
(
*
ReplyTicketList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
11
}
}
func
(
m
*
ReplyTicketList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReplyTicketList
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReplyTicketList
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReplyTicketList
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReplyTicketList
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReplyTicketList
.
Merge
(
m
,
src
)
}
func
(
m
*
ReplyTicketList
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReplyTicketList
.
Size
(
m
)
}
func
(
m
*
ReplyTicketList
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReplyTicketList
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReplyTicketList
proto
.
InternalMessageInfo
func
(
m
*
ReplyTicketList
)
GetTickets
()
[]
*
Ticket
{
if
m
!=
nil
{
return
m
.
Tickets
}
return
nil
}
type
ReplyWalletTickets
struct
{
Tickets
[]
*
Ticket
`protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
Privkeys
[][]
byte
`protobuf:"bytes,2,rep,name=privkeys,proto3" json:"privkeys,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReplyWalletTickets
)
Reset
()
{
*
m
=
ReplyWalletTickets
{}
}
func
(
m
*
ReplyWalletTickets
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyWalletTickets
)
ProtoMessage
()
{}
func
(
*
ReplyWalletTickets
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
12
}
}
func
(
m
*
ReplyWalletTickets
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReplyWalletTickets
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReplyWalletTickets
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReplyWalletTickets
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReplyWalletTickets
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReplyWalletTickets
.
Merge
(
m
,
src
)
}
func
(
m
*
ReplyWalletTickets
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReplyWalletTickets
.
Size
(
m
)
}
func
(
m
*
ReplyWalletTickets
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReplyWalletTickets
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReplyWalletTickets
proto
.
InternalMessageInfo
func
(
m
*
ReplyWalletTickets
)
GetTickets
()
[]
*
Ticket
{
if
m
!=
nil
{
return
m
.
Tickets
}
return
nil
}
func
(
m
*
ReplyWalletTickets
)
GetPrivkeys
()
[][]
byte
{
if
m
!=
nil
{
return
m
.
Privkeys
}
return
nil
}
type
ReceiptTicket
struct
{
TicketId
string
`protobuf:"bytes,1,opt,name=ticketId,proto3" json:"ticketId,omitempty"`
Status
int32
`protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
PrevStatus
int32
`protobuf:"varint,3,opt,name=prevStatus,proto3" json:"prevStatus,omitempty"`
Addr
string
`protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReceiptTicket
)
Reset
()
{
*
m
=
ReceiptTicket
{}
}
func
(
m
*
ReceiptTicket
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptTicket
)
ProtoMessage
()
{}
func
(
*
ReceiptTicket
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
13
}
}
func
(
m
*
ReceiptTicket
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReceiptTicket
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReceiptTicket
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReceiptTicket
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReceiptTicket
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReceiptTicket
.
Merge
(
m
,
src
)
}
func
(
m
*
ReceiptTicket
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReceiptTicket
.
Size
(
m
)
}
func
(
m
*
ReceiptTicket
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReceiptTicket
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReceiptTicket
proto
.
InternalMessageInfo
func
(
m
*
ReceiptTicket
)
GetTicketId
()
string
{
if
m
!=
nil
{
return
m
.
TicketId
}
return
""
}
func
(
m
*
ReceiptTicket
)
GetStatus
()
int32
{
if
m
!=
nil
{
return
m
.
Status
}
return
0
}
func
(
m
*
ReceiptTicket
)
GetPrevStatus
()
int32
{
if
m
!=
nil
{
return
m
.
PrevStatus
}
return
0
}
func
(
m
*
ReceiptTicket
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
return
""
}
type
ReceiptTicketBind
struct
{
OldMinerAddress
string
`protobuf:"bytes,1,opt,name=oldMinerAddress,proto3" json:"oldMinerAddress,omitempty"`
NewMinerAddress
string
`protobuf:"bytes,2,opt,name=newMinerAddress,proto3" json:"newMinerAddress,omitempty"`
ReturnAddress
string
`protobuf:"bytes,3,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReceiptTicketBind
)
Reset
()
{
*
m
=
ReceiptTicketBind
{}
}
func
(
m
*
ReceiptTicketBind
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptTicketBind
)
ProtoMessage
()
{}
func
(
*
ReceiptTicketBind
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
14
}
}
func
(
m
*
ReceiptTicketBind
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReceiptTicketBind
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReceiptTicketBind
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReceiptTicketBind
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReceiptTicketBind
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReceiptTicketBind
.
Merge
(
m
,
src
)
}
func
(
m
*
ReceiptTicketBind
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReceiptTicketBind
.
Size
(
m
)
}
func
(
m
*
ReceiptTicketBind
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReceiptTicketBind
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReceiptTicketBind
proto
.
InternalMessageInfo
func
(
m
*
ReceiptTicketBind
)
GetOldMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
OldMinerAddress
}
return
""
}
func
(
m
*
ReceiptTicketBind
)
GetNewMinerAddress
()
string
{
if
m
!=
nil
{
return
m
.
NewMinerAddress
}
return
""
}
func
(
m
*
ReceiptTicketBind
)
GetReturnAddress
()
string
{
if
m
!=
nil
{
return
m
.
ReturnAddress
}
return
""
}
type
ReqBindMiner
struct
{
BindAddr
string
`protobuf:"bytes,1,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"`
OriginAddr
string
`protobuf:"bytes,2,opt,name=originAddr,proto3" json:"originAddr,omitempty"`
Amount
int64
`protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
CheckBalance
bool
`protobuf:"varint,4,opt,name=checkBalance,proto3" json:"checkBalance,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqBindMiner
)
Reset
()
{
*
m
=
ReqBindMiner
{}
}
func
(
m
*
ReqBindMiner
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqBindMiner
)
ProtoMessage
()
{}
func
(
*
ReqBindMiner
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
15
}
}
func
(
m
*
ReqBindMiner
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqBindMiner
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqBindMiner
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqBindMiner
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqBindMiner
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqBindMiner
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqBindMiner
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqBindMiner
.
Size
(
m
)
}
func
(
m
*
ReqBindMiner
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqBindMiner
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqBindMiner
proto
.
InternalMessageInfo
func
(
m
*
ReqBindMiner
)
GetBindAddr
()
string
{
if
m
!=
nil
{
return
m
.
BindAddr
}
return
""
}
func
(
m
*
ReqBindMiner
)
GetOriginAddr
()
string
{
if
m
!=
nil
{
return
m
.
OriginAddr
}
return
""
}
func
(
m
*
ReqBindMiner
)
GetAmount
()
int64
{
if
m
!=
nil
{
return
m
.
Amount
}
return
0
}
func
(
m
*
ReqBindMiner
)
GetCheckBalance
()
bool
{
if
m
!=
nil
{
return
m
.
CheckBalance
}
return
false
}
type
ReplyBindMiner
struct
{
TxHex
string
`protobuf:"bytes,1,opt,name=txHex,proto3" json:"txHex,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReplyBindMiner
)
Reset
()
{
*
m
=
ReplyBindMiner
{}
}
func
(
m
*
ReplyBindMiner
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyBindMiner
)
ProtoMessage
()
{}
func
(
*
ReplyBindMiner
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_98a6c21780e82d22
,
[]
int
{
16
}
}
func
(
m
*
ReplyBindMiner
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReplyBindMiner
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReplyBindMiner
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReplyBindMiner
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReplyBindMiner
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReplyBindMiner
.
Merge
(
m
,
src
)
}
func
(
m
*
ReplyBindMiner
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReplyBindMiner
.
Size
(
m
)
}
func
(
m
*
ReplyBindMiner
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReplyBindMiner
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReplyBindMiner
proto
.
InternalMessageInfo
func
(
m
*
ReplyBindMiner
)
GetTxHex
()
string
{
if
m
!=
nil
{
return
m
.
TxHex
}
return
""
}
func
init
()
{
proto
.
RegisterType
((
*
Ticket
)(
nil
),
"types.Ticket"
)
proto
.
RegisterType
((
*
TicketAction
)(
nil
),
"types.TicketAction"
)
proto
.
RegisterType
((
*
TicketMiner
)(
nil
),
"types.TicketMiner"
)
proto
.
RegisterType
((
*
TicketMinerOld
)(
nil
),
"types.TicketMinerOld"
)
proto
.
RegisterType
((
*
MinerFlag
)(
nil
),
"types.MinerFlag"
)
proto
.
RegisterType
((
*
TicketBind
)(
nil
),
"types.TicketBind"
)
proto
.
RegisterType
((
*
TicketOpen
)(
nil
),
"types.TicketOpen"
)
proto
.
RegisterType
((
*
TicketGenesis
)(
nil
),
"types.TicketGenesis"
)
proto
.
RegisterType
((
*
TicketClose
)(
nil
),
"types.TicketClose"
)
proto
.
RegisterType
((
*
TicketList
)(
nil
),
"types.TicketList"
)
proto
.
RegisterType
((
*
TicketInfos
)(
nil
),
"types.TicketInfos"
)
proto
.
RegisterType
((
*
ReplyTicketList
)(
nil
),
"types.ReplyTicketList"
)
proto
.
RegisterType
((
*
ReplyWalletTickets
)(
nil
),
"types.ReplyWalletTickets"
)
proto
.
RegisterType
((
*
ReceiptTicket
)(
nil
),
"types.ReceiptTicket"
)
proto
.
RegisterType
((
*
ReceiptTicketBind
)(
nil
),
"types.ReceiptTicketBind"
)
proto
.
RegisterType
((
*
ReqBindMiner
)(
nil
),
"types.ReqBindMiner"
)
proto
.
RegisterType
((
*
ReplyBindMiner
)(
nil
),
"types.ReplyBindMiner"
)
}
func
init
()
{
proto
.
RegisterFile
(
"ticket.proto"
,
fileDescriptor_98a6c21780e82d22
)
}
var
fileDescriptor_98a6c21780e82d22
=
[]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
0x05
,
0x31
,
0x1d
,
0x37
,
0xf5
,
0xbf
,
0xc8
,
0x64
,
0xe2
,
0xdb
,
0xf0
,
0x52
,
0xe9
,
0x6f
,
0xbf
,
0xe1
,
0x3d
,
0xf6
,
0x15
,
0x8c
,
0xaf
,
0x50
,
0x9f
,
0xad
,
0x75
,
0xba
,
0x90
,
0x4a
,
0xaa
,
0x25
,
0x7b
,
0xc7
,
0x02
,
0xea
,
0x6b
,
0xb4
,
0x2e
,
0xa1
,
0x66
,
0xbc
,
0x77
,
0x3d
,
0xa0
,
0x3f
,
0x8f
,
0xaf
,
0xff
,
0x0d
,
0x00
,
0x00
,
0xff
,
0xff
,
0xd7
,
0x1e
,
0x82
,
0xa2
,
0x9e
,
0x08
,
0x00
,
0x00
,
}
// Reference imports to suppress errors if they are not otherwise used.
var
_
context
.
Context
var
_
grpc
.
ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const
_
=
grpc
.
SupportPackageIsVersion4
// TicketClient is the client API for Ticket service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type
TicketClient
interface
{
//创建绑定挖矿
CreateBindMiner
(
ctx
context
.
Context
,
in
*
ReqBindMiner
,
opts
...
grpc
.
CallOption
)
(
*
ReplyBindMiner
,
error
)
//查询钱包票数
GetTicketCount
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Int64
,
error
)
// Miner
//设置自动挖矿
SetAutoMining
(
ctx
context
.
Context
,
in
*
MinerFlag
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
}
type
ticketClient
struct
{
cc
*
grpc
.
ClientConn
}
func
NewTicketClient
(
cc
*
grpc
.
ClientConn
)
TicketClient
{
return
&
ticketClient
{
cc
}
}
func
(
c
*
ticketClient
)
CreateBindMiner
(
ctx
context
.
Context
,
in
*
ReqBindMiner
,
opts
...
grpc
.
CallOption
)
(
*
ReplyBindMiner
,
error
)
{
out
:=
new
(
ReplyBindMiner
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.ticket/CreateBindMiner"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
ticketClient
)
GetTicketCount
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Int64
,
error
)
{
out
:=
new
(
types
.
Int64
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.ticket/GetTicketCount"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
ticketClient
)
SetAutoMining
(
ctx
context
.
Context
,
in
*
MinerFlag
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
{
out
:=
new
(
types
.
Reply
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.ticket/SetAutoMining"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
// TicketServer is the server API for Ticket service.
type
TicketServer
interface
{
//创建绑定挖矿
CreateBindMiner
(
context
.
Context
,
*
ReqBindMiner
)
(
*
ReplyBindMiner
,
error
)
//查询钱包票数
GetTicketCount
(
context
.
Context
,
*
types
.
ReqNil
)
(
*
types
.
Int64
,
error
)
// Miner
//设置自动挖矿
SetAutoMining
(
context
.
Context
,
*
MinerFlag
)
(
*
types
.
Reply
,
error
)
}
func
RegisterTicketServer
(
s
*
grpc
.
Server
,
srv
TicketServer
)
{
s
.
RegisterService
(
&
_Ticket_serviceDesc
,
srv
)
}
func
_Ticket_CreateBindMiner_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqBindMiner
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
TicketServer
)
.
CreateBindMiner
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.ticket/CreateBindMiner"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
TicketServer
)
.
CreateBindMiner
(
ctx
,
req
.
(
*
ReqBindMiner
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Ticket_GetTicketCount_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
types
.
ReqNil
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
TicketServer
)
.
GetTicketCount
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.ticket/GetTicketCount"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
TicketServer
)
.
GetTicketCount
(
ctx
,
req
.
(
*
types
.
ReqNil
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Ticket_SetAutoMining_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
MinerFlag
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
TicketServer
)
.
SetAutoMining
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.ticket/SetAutoMining"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
TicketServer
)
.
SetAutoMining
(
ctx
,
req
.
(
*
MinerFlag
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
var
_Ticket_serviceDesc
=
grpc
.
ServiceDesc
{
ServiceName
:
"types.ticket"
,
HandlerType
:
(
*
TicketServer
)(
nil
),
Methods
:
[]
grpc
.
MethodDesc
{
{
MethodName
:
"CreateBindMiner"
,
Handler
:
_Ticket_CreateBindMiner_Handler
,
},
{
MethodName
:
"GetTicketCount"
,
Handler
:
_Ticket_GetTicketCount_Handler
,
},
{
MethodName
:
"SetAutoMining"
,
Handler
:
_Ticket_SetAutoMining_Handler
,
},
},
Streams
:
[]
grpc
.
StreamDesc
{},
Metadata
:
"ticket.proto"
,
}
vendor/github.com/33cn/chain33/types/cfg.go
View file @
7c5ce435
...
...
@@ -81,6 +81,8 @@ type Consensus struct {
Genesis
string
`protobuf:"bytes,4,opt,name=genesis" json:"genesis,omitempty"`
HotkeyAddr
string
`protobuf:"bytes,5,opt,name=hotkeyAddr" json:"hotkeyAddr,omitempty"`
ForceMining
bool
`protobuf:"varint,6,opt,name=forceMining" json:"forceMining,omitempty"`
// 配置挖矿的合约名单
MinerExecs
[]
string
`protobuf:"bytes,7,rep,name=minerExecs" json:"minerExecs,omitempty"`
}
// Wallet 配置
...
...
vendor/github.com/33cn/chain33/types/config.go
View file @
7c5ce435
...
...
@@ -20,15 +20,15 @@ import (
//区块链共识相关的参数,重要参数不要随便修改
var
(
AllowUserExec
=
[][]
byte
{
ExecerNone
}
//
AllowDepositExec 这里又限制了一次,因为挖矿的合约不会太多,所以这里配置死了,如果要扩展,需要改这里的代码
AllowDepositExec
=
[][]
byte
{[]
byte
(
"ticket"
)
}
EmptyValue
=
[]
byte
(
"FFFFFFFFemptyBVBiCj5jvE15pEiwro8TQRGnJSNsJF"
)
//这字符串表示数据库中的空值
title
string
mu
sync
.
Mutex
titles
=
map
[
string
]
bool
{}
chainConfig
=
make
(
map
[
string
]
interface
{})
mver
=
make
(
map
[
string
]
*
mversion
)
coinSymbol
=
"bty"
//
挖矿的合约名单,适配旧配置,默认ticket
minerExecs
=
[]
string
{
"ticket"
}
EmptyValue
=
[]
byte
(
"FFFFFFFFemptyBVBiCj5jvE15pEiwro8TQRGnJSNsJF"
)
//这字符串表示数据库中的空值
title
string
mu
sync
.
Mutex
titles
=
map
[
string
]
bool
{}
chainConfig
=
make
(
map
[
string
]
interface
{})
mver
=
make
(
map
[
string
]
*
mversion
)
coinSymbol
=
"bty"
)
// coin conversation
...
...
@@ -93,6 +93,17 @@ func GetP(height int64) *ChainParam {
return
c
}
// GetMinerExecs 获取挖矿的合约名单
func
GetMinerExecs
()
[]
string
{
return
minerExecs
}
func
setMinerExecs
(
execs
[]
string
)
{
if
len
(
execs
)
>
0
{
minerExecs
=
execs
}
}
// GetFundAddr 获取基金账户地址
func
GetFundAddr
()
string
{
return
MGStr
(
"mver.consensus.fundKeyAddr"
,
0
)
...
...
@@ -260,6 +271,7 @@ func Init(t string, cfg *Config) {
if
cfg
.
Exec
.
MaxExecFee
<
cfg
.
Mempool
.
MaxTxFee
{
panic
(
"config must meet: mempool.maxTxFee <= exec.maxExecFee"
)
}
setMinerExecs
(
cfg
.
Consensus
.
MinerExecs
)
setMinFee
(
cfg
.
Exec
.
MinExecFee
)
setChainConfig
(
"FixTime"
,
cfg
.
FixTime
)
if
cfg
.
Exec
.
MaxExecFee
>
0
{
...
...
vendor/github.com/33cn/chain33/types/mocks/chain33client.go
View file @
7c5ce435
...
...
@@ -1302,36 +1302,6 @@ func (_m *Chain33Client) SaveSeed(ctx context.Context, in *types.SaveSeedByPw, o
return
r0
,
r1
}
// SendRawTransaction provides a mock function with given fields: ctx, in, opts
func
(
_m
*
Chain33Client
)
SendRawTransaction
(
ctx
context
.
Context
,
in
*
types
.
SignedTx
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
{
_va
:=
make
([]
interface
{},
len
(
opts
))
for
_i
:=
range
opts
{
_va
[
_i
]
=
opts
[
_i
]
}
var
_ca
[]
interface
{}
_ca
=
append
(
_ca
,
ctx
,
in
)
_ca
=
append
(
_ca
,
_va
...
)
ret
:=
_m
.
Called
(
_ca
...
)
var
r0
*
types
.
Reply
if
rf
,
ok
:=
ret
.
Get
(
0
)
.
(
func
(
context
.
Context
,
*
types
.
SignedTx
,
...
grpc
.
CallOption
)
*
types
.
Reply
);
ok
{
r0
=
rf
(
ctx
,
in
,
opts
...
)
}
else
{
if
ret
.
Get
(
0
)
!=
nil
{
r0
=
ret
.
Get
(
0
)
.
(
*
types
.
Reply
)
}
}
var
r1
error
if
rf
,
ok
:=
ret
.
Get
(
1
)
.
(
func
(
context
.
Context
,
*
types
.
SignedTx
,
...
grpc
.
CallOption
)
error
);
ok
{
r1
=
rf
(
ctx
,
in
,
opts
...
)
}
else
{
r1
=
ret
.
Error
(
1
)
}
return
r0
,
r1
}
// SendToAddress provides a mock function with given fields: ctx, in, opts
func
(
_m
*
Chain33Client
)
SendToAddress
(
ctx
context
.
Context
,
in
*
types
.
ReqWalletSendToAddress
,
opts
...
grpc
.
CallOption
)
(
*
types
.
ReplyHash
,
error
)
{
_va
:=
make
([]
interface
{},
len
(
opts
))
...
...
vendor/github.com/33cn/chain33/types/proto/rpc.proto
View file @
7c5ce435
...
...
@@ -20,8 +20,6 @@ service chain33 {
//交易接口
rpc
CreateRawTransaction
(
CreateTx
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTxGroup
(
CreateTransactionGroup
)
returns
(
UnsignTx
)
{}
//发送签名后交易
rpc
SendRawTransaction
(
SignedTx
)
returns
(
Reply
)
{}
// 根据哈希查询交易
rpc
QueryTransaction
(
ReqHash
)
returns
(
TransactionDetail
)
{}
// 发送交易
...
...
vendor/github.com/33cn/chain33/types/proto/transaction.proto
View file @
7c5ce435
...
...
@@ -76,13 +76,6 @@ message NoBalanceTx {
string
expire
=
4
;
}
message
SignedTx
{
bytes
unsign
=
1
;
bytes
sign
=
2
;
bytes
pubkey
=
3
;
int32
ty
=
4
;
}
message
Transaction
{
bytes
execer
=
1
;
bytes
payload
=
2
;
...
...
vendor/github.com/33cn/chain33/types/rpc.pb.go
View file @
7c5ce435
...
...
@@ -26,74 +26,74 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
func
init
()
{
proto
.
RegisterFile
(
"rpc.proto"
,
fileDescriptor_77a6da22d6a3feb1
)
}
var
fileDescriptor_77a6da22d6a3feb1
=
[]
byte
{
// 10
68
bytes of a gzipped FileDescriptorProto
// 10
57
bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x94
,
0x56
,
0x6d
,
0x6f
,
0xdb
,
0x36
,
0x10
,
0xd6
,
0x87
,
0xad
,
0x69
,
0x58
,
0x27
,
0x71
,
0x98
,
0x34
,
0x6
b
,
0x85
,
0x15
,
0x05
,
0x04
,
0x0c
,
0x1b
,
0x30
,
0xd4
,
0x6e
,
0xed
,
0x
2d
,
0x7b
,
0x29
,
0x36
,
0x20
,
0x4e
,
0x66
,
0xc7
,
0x58
,
0xea
,
0xa5
,
0x91
,
0xbb
,
0x01
,
0xfb
,
0x46
,
0xcb
,
0x37
,
0x47
,
0x88
,
0x4c
,
0x2a
,
0x24
,
0x15
,
0x
cb
,
0xbf
,
0x66
,
0x
7f
,
0x75
,
0x20
,
0x25
,
0xea
,
0xdd
,
0x49
,
0xf6
,
0x4d
,
0xbc
,
0xbb
,
0xe7
,
0x5e
,
0xc4
,
0xe7
,
0xee
,
0x
88
,
0xb6
,
0x79
,
0xe8
,
0x75
,
0x42
,
0xce
,
0x24
,
0xc3
,
0x9f
,
0xcb
,
0x75
,
0x08
,
0xc2
,
0x6e
,
0x79
,
0x
6c
,
0xb9
,
0x64
,
0x34
,
0x11
,
0xda
,
0xfb
,
0x92
,
0x13
,
0x2a
,
0x88
,
0x27
,
0xfd
,
0x4c
,
0xd4
,
0x9e
,
0x
05
,
0xcc
,
0xbb
,
0xf1
,
0xae
,
0x89
,
0x6f
,
0x24
,
0xad
,
0x15
,
0x09
,
0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x67
,
0x41
,
0xa0
,
0x98
,
0x6b
,
0x5a
,
0x2e
,
0xb7
,
0x9d
,
0x8a
,
0x9a
,
0x74
,
0x
58
,
0x16
,
0xc5
,
0x9a
,
0xdf
,
0xbb
,
0xae
,
0xbf
,
0xa0
,
0xfa
,
0xc7
,
0x0e
,
0x1f
,
0xe5
,
0x08
,
0x67
,
0x
84
,
0xc5
,
0x39
,
0x9b
,
0x8a
,
0x1d
,
0x0b
,
0x0f
,
0x91
,
0x1d
,
0x37
,
0xc0
,
0x98
,
0x25
,
0xfe
,
0xea
,
0x
7e
,
0xcd
,
0x32
,
0xe5
,
0x3d
,
0xae
,
0x4e
,
0x51
,
0x43
,
0x77
,
0xe7
,
0x15
,
0xa1
,
0xf3
,
0x71
,
0xb4
,
0x
c4
,
0x19
,
0xcf
,
0x6f
,
0x95
,
0x48
,
0x57
,
0xa7
,
0x6e
,
0x10
,
0x7e
,
0xab
,
0xa7
,
0x5a
,
0x9f
,
0xf1
,
0x
c2
,
0x8e
,
0xfb
,
0x1d
,
0x36
,
0xe5
,
0x5a
,
0xf6
,
0x5e
,
0xff
,
0xfd
,
0x6a
,
0xe1
,
0xcb
,
0xeb
,
0x68
,
0x
d6
,
0xf2
,
0xd8
,
0xb2
,
0xdd
,
0xed
,
0x7a
,
0xb4
,
0x9d
,
0xfc
,
0x79
,
0xb7
,
0xb5
,
0xe1
,
0xec
,
0x89
,
0xf
e
,
0x25
,
0xef
,
0xfe
,
0x17
,
0x00
,
0x00
,
0xff
,
0xff
,
0x13
,
0xe5
,
0x27
,
0xe0
,
0x11
,
0x0c
,
0x00
,
0x00
,
}
// Reference imports to suppress errors if they are not otherwise used.
...
...
@@ -116,8 +116,6 @@ type Chain33Client interface {
//交易接口
CreateRawTransaction
(
ctx
context
.
Context
,
in
*
CreateTx
,
opts
...
grpc
.
CallOption
)
(
*
UnsignTx
,
error
)
CreateRawTxGroup
(
ctx
context
.
Context
,
in
*
CreateTransactionGroup
,
opts
...
grpc
.
CallOption
)
(
*
UnsignTx
,
error
)
//发送签名后交易
SendRawTransaction
(
ctx
context
.
Context
,
in
*
SignedTx
,
opts
...
grpc
.
CallOption
)
(
*
Reply
,
error
)
// 根据哈希查询交易
QueryTransaction
(
ctx
context
.
Context
,
in
*
ReqHash
,
opts
...
grpc
.
CallOption
)
(
*
TransactionDetail
,
error
)
// 发送交易
...
...
@@ -256,15 +254,6 @@ func (c *chain33Client) CreateRawTxGroup(ctx context.Context, in *CreateTransact
return
out
,
nil
}
func
(
c
*
chain33Client
)
SendRawTransaction
(
ctx
context
.
Context
,
in
*
SignedTx
,
opts
...
grpc
.
CallOption
)
(
*
Reply
,
error
)
{
out
:=
new
(
Reply
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.chain33/SendRawTransaction"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
chain33Client
)
QueryTransaction
(
ctx
context
.
Context
,
in
*
ReqHash
,
opts
...
grpc
.
CallOption
)
(
*
TransactionDetail
,
error
)
{
out
:=
new
(
TransactionDetail
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.chain33/QueryTransaction"
,
in
,
out
,
opts
...
)
...
...
@@ -707,8 +696,6 @@ type Chain33Server interface {
//交易接口
CreateRawTransaction
(
context
.
Context
,
*
CreateTx
)
(
*
UnsignTx
,
error
)
CreateRawTxGroup
(
context
.
Context
,
*
CreateTransactionGroup
)
(
*
UnsignTx
,
error
)
//发送签名后交易
SendRawTransaction
(
context
.
Context
,
*
SignedTx
)
(
*
Reply
,
error
)
// 根据哈希查询交易
QueryTransaction
(
context
.
Context
,
*
ReqHash
)
(
*
TransactionDetail
,
error
)
// 发送交易
...
...
@@ -879,24 +866,6 @@ func _Chain33_CreateRawTxGroup_Handler(srv interface{}, ctx context.Context, dec
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Chain33_SendRawTransaction_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
SignedTx
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
Chain33Server
)
.
SendRawTransaction
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.chain33/SendRawTransaction"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
Chain33Server
)
.
SendRawTransaction
(
ctx
,
req
.
(
*
SignedTx
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Chain33_QueryTransaction_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqHash
)
if
err
:=
dec
(
in
);
err
!=
nil
{
...
...
@@ -1782,10 +1751,6 @@ var _Chain33_serviceDesc = grpc.ServiceDesc{
Handler
:
_Chain33_CreateRawTxGroup_Handler
,
},
{
MethodName
:
"SendRawTransaction"
,
Handler
:
_Chain33_SendRawTransaction_Handler
,
},
{
MethodName
:
"QueryTransaction"
,
Handler
:
_Chain33_QueryTransaction_Handler
,
},
...
...
vendor/github.com/33cn/chain33/types/transaction.pb.go
View file @
7c5ce435
...
...
@@ -638,69 +638,6 @@ func (m *NoBalanceTx) GetExpire() string {
return
""
}
type
SignedTx
struct
{
Unsign
[]
byte
`protobuf:"bytes,1,opt,name=unsign,proto3" json:"unsign,omitempty"`
Sign
[]
byte
`protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"`
Pubkey
[]
byte
`protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
Ty
int32
`protobuf:"varint,4,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
SignedTx
)
Reset
()
{
*
m
=
SignedTx
{}
}
func
(
m
*
SignedTx
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SignedTx
)
ProtoMessage
()
{}
func
(
*
SignedTx
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
10
}
}
func
(
m
*
SignedTx
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SignedTx
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
SignedTx
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_SignedTx
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
SignedTx
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_SignedTx
.
Merge
(
m
,
src
)
}
func
(
m
*
SignedTx
)
XXX_Size
()
int
{
return
xxx_messageInfo_SignedTx
.
Size
(
m
)
}
func
(
m
*
SignedTx
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_SignedTx
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_SignedTx
proto
.
InternalMessageInfo
func
(
m
*
SignedTx
)
GetUnsign
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Unsign
}
return
nil
}
func
(
m
*
SignedTx
)
GetSign
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Sign
}
return
nil
}
func
(
m
*
SignedTx
)
GetPubkey
()
[]
byte
{
if
m
!=
nil
{
return
m
.
Pubkey
}
return
nil
}
func
(
m
*
SignedTx
)
GetTy
()
int32
{
if
m
!=
nil
{
return
m
.
Ty
}
return
0
}
type
Transaction
struct
{
Execer
[]
byte
`protobuf:"bytes,1,opt,name=execer,proto3" json:"execer,omitempty"`
Payload
[]
byte
`protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
...
...
@@ -723,7 +660,7 @@ func (m *Transaction) Reset() { *m = Transaction{} }
func
(
m
*
Transaction
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Transaction
)
ProtoMessage
()
{}
func
(
*
Transaction
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
1
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
0
}
}
func
(
m
*
Transaction
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -825,7 +762,7 @@ func (m *Transactions) Reset() { *m = Transactions{} }
func
(
m
*
Transactions
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Transactions
)
ProtoMessage
()
{}
func
(
*
Transactions
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
2
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
1
}
}
func
(
m
*
Transactions
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -865,7 +802,7 @@ func (m *RingSignature) Reset() { *m = RingSignature{} }
func
(
m
*
RingSignature
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RingSignature
)
ProtoMessage
()
{}
func
(
*
RingSignature
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
3
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
2
}
}
func
(
m
*
RingSignature
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -906,7 +843,7 @@ func (m *RingSignatureItem) Reset() { *m = RingSignatureItem{} }
func
(
m
*
RingSignatureItem
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RingSignatureItem
)
ProtoMessage
()
{}
func
(
*
RingSignatureItem
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
4
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
3
}
}
func
(
m
*
RingSignatureItem
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -965,7 +902,7 @@ func (m *Signature) Reset() { *m = Signature{} }
func
(
m
*
Signature
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Signature
)
ProtoMessage
()
{}
func
(
*
Signature
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
5
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
4
}
}
func
(
m
*
Signature
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1020,7 +957,7 @@ func (m *AddrOverview) Reset() { *m = AddrOverview{} }
func
(
m
*
AddrOverview
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
AddrOverview
)
ProtoMessage
()
{}
func
(
*
AddrOverview
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
6
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
5
}
}
func
(
m
*
AddrOverview
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1079,7 +1016,7 @@ func (m *ReqAddr) Reset() { *m = ReqAddr{} }
func
(
m
*
ReqAddr
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqAddr
)
ProtoMessage
()
{}
func
(
*
ReqAddr
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
7
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
6
}
}
func
(
m
*
ReqAddr
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1155,7 +1092,7 @@ func (m *ReqPrivacy) Reset() { *m = ReqPrivacy{} }
func
(
m
*
ReqPrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPrivacy
)
ProtoMessage
()
{}
func
(
*
ReqPrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
8
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
7
}
}
func
(
m
*
ReqPrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1208,7 +1145,7 @@ func (m *HexTx) Reset() { *m = HexTx{} }
func
(
m
*
HexTx
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
HexTx
)
ProtoMessage
()
{}
func
(
*
HexTx
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
9
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
1
8
}
}
func
(
m
*
HexTx
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1250,7 +1187,7 @@ func (m *ReplyTxInfo) Reset() { *m = ReplyTxInfo{} }
func
(
m
*
ReplyTxInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyTxInfo
)
ProtoMessage
()
{}
func
(
*
ReplyTxInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
20
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
19
}
}
func
(
m
*
ReplyTxInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1310,7 +1247,7 @@ func (m *ReqTxList) Reset() { *m = ReqTxList{} }
func
(
m
*
ReqTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqTxList
)
ProtoMessage
()
{}
func
(
*
ReqTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
1
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
0
}
}
func
(
m
*
ReqTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1349,7 +1286,7 @@ func (m *ReplyTxList) Reset() { *m = ReplyTxList{} }
func
(
m
*
ReplyTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyTxList
)
ProtoMessage
()
{}
func
(
*
ReplyTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
2
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
1
}
}
func
(
m
*
ReplyTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1388,7 +1325,7 @@ func (m *ReplyProperFee) Reset() { *m = ReplyProperFee{} }
func
(
m
*
ReplyProperFee
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyProperFee
)
ProtoMessage
()
{}
func
(
*
ReplyProperFee
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
3
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
2
}
}
func
(
m
*
ReplyProperFee
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1429,7 +1366,7 @@ func (m *TxHashList) Reset() { *m = TxHashList{} }
func
(
m
*
TxHashList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TxHashList
)
ProtoMessage
()
{}
func
(
*
TxHashList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
4
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
3
}
}
func
(
m
*
TxHashList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1482,7 +1419,7 @@ func (m *ReplyTxInfos) Reset() { *m = ReplyTxInfos{} }
func
(
m
*
ReplyTxInfos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyTxInfos
)
ProtoMessage
()
{}
func
(
*
ReplyTxInfos
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
5
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
4
}
}
func
(
m
*
ReplyTxInfos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1522,7 +1459,7 @@ func (m *ReceiptLog) Reset() { *m = ReceiptLog{} }
func
(
m
*
ReceiptLog
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptLog
)
ProtoMessage
()
{}
func
(
*
ReceiptLog
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
6
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
5
}
}
func
(
m
*
ReceiptLog
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1573,7 +1510,7 @@ func (m *Receipt) Reset() { *m = Receipt{} }
func
(
m
*
Receipt
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Receipt
)
ProtoMessage
()
{}
func
(
*
Receipt
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
7
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
6
}
}
func
(
m
*
Receipt
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1627,7 +1564,7 @@ func (m *ReceiptData) Reset() { *m = ReceiptData{} }
func
(
m
*
ReceiptData
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReceiptData
)
ProtoMessage
()
{}
func
(
*
ReceiptData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
8
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
7
}
}
func
(
m
*
ReceiptData
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1678,7 +1615,7 @@ func (m *TxResult) Reset() { *m = TxResult{} }
func
(
m
*
TxResult
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TxResult
)
ProtoMessage
()
{}
func
(
*
TxResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
9
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
2
8
}
}
func
(
m
*
TxResult
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1761,7 +1698,7 @@ func (m *TransactionDetail) Reset() { *m = TransactionDetail{} }
func
(
m
*
TransactionDetail
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionDetail
)
ProtoMessage
()
{}
func
(
*
TransactionDetail
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
30
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
29
}
}
func
(
m
*
TransactionDetail
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1863,7 +1800,7 @@ func (m *TransactionDetails) Reset() { *m = TransactionDetails{} }
func
(
m
*
TransactionDetails
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransactionDetails
)
ProtoMessage
()
{}
func
(
*
TransactionDetails
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
1
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
0
}
}
func
(
m
*
TransactionDetails
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1902,7 +1839,7 @@ func (m *ReqAddrs) Reset() { *m = ReqAddrs{} }
func
(
m
*
ReqAddrs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqAddrs
)
ProtoMessage
()
{}
func
(
*
ReqAddrs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
2
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
1
}
}
func
(
m
*
ReqAddrs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1941,7 +1878,7 @@ func (m *ReqDecodeRawTransaction) Reset() { *m = ReqDecodeRawTransaction
func
(
m
*
ReqDecodeRawTransaction
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqDecodeRawTransaction
)
ProtoMessage
()
{}
func
(
*
ReqDecodeRawTransaction
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
3
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
2
}
}
func
(
m
*
ReqDecodeRawTransaction
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -1981,7 +1918,7 @@ func (m *UserWrite) Reset() { *m = UserWrite{} }
func
(
m
*
UserWrite
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UserWrite
)
ProtoMessage
()
{}
func
(
*
UserWrite
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
4
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
3
}
}
func
(
m
*
UserWrite
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2029,7 +1966,7 @@ func (m *UpgradeMeta) Reset() { *m = UpgradeMeta{} }
func
(
m
*
UpgradeMeta
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UpgradeMeta
)
ProtoMessage
()
{}
func
(
*
UpgradeMeta
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
5
}
return
fileDescriptor_2cc4e03d2c28c490
,
[]
int
{
3
4
}
}
func
(
m
*
UpgradeMeta
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2082,7 +2019,6 @@ func init() {
proto
.
RegisterType
((
*
CreateTransactionGroup
)(
nil
),
"types.CreateTransactionGroup"
)
proto
.
RegisterType
((
*
UnsignTx
)(
nil
),
"types.UnsignTx"
)
proto
.
RegisterType
((
*
NoBalanceTx
)(
nil
),
"types.NoBalanceTx"
)
proto
.
RegisterType
((
*
SignedTx
)(
nil
),
"types.SignedTx"
)
proto
.
RegisterType
((
*
Transaction
)(
nil
),
"types.Transaction"
)
proto
.
RegisterType
((
*
Transactions
)(
nil
),
"types.Transactions"
)
proto
.
RegisterType
((
*
RingSignature
)(
nil
),
"types.RingSignature"
)
...
...
@@ -2113,90 +2049,88 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"transaction.proto"
,
fileDescriptor_2cc4e03d2c28c490
)
}
var
fileDescriptor_2cc4e03d2c28c490
=
[]
byte
{
// 1348 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xc4
,
0x57
,
0xdb
,
0x8e
,
0x13
,
0x47
,
0x13
,
0x96
,
0x67
,
0x6c
,
0xaf
,
0x5d
,
0x36
,
0xfc
,
0xec
,
0x08
,
0x2d
,
0x16
,
0xe2
,
0x87
,
0x4d
,
0x8b
,
0x48
,
0x08
,
0x21
,
0xaf
,
0xb4
,
0xcb
,
0x5d
,
0x22
,
0x25
,
0xc0
,
0x26
,
0x80
,
0x16
,
0x08
,
0x69
,
0xcc
,
0x41
,
0x49
,
0x14
,
0xa9
,
0x77
,
0x5c
,
0x6b
,
0x77
,
0xb0
,
0xa7
,
0xbd
,
0x33
,
0xed
,
0x65
,
0xfc
,
0x02
,
0xb9
,
0x49
,
0xee
,
0xf2
,
0x48
,
0x79
,
0x81
,
0x3c
,
0x46
,
0x1e
,
0x23
,
0xea
,
0xea
,
0xee
,
0x99
,
0x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8b
,
0x2c
,
0xad
,
0x4c
,
0x0c
,
0x30
,
0x5f
,
0x97
,
0x54
,
0xe6
,
0x1a
,
0xdd
,
0x5c
,
0xe8
,
0x72
,
0x0f
,
0xd9
,
0x4f
,
0xd0
,
0x7b
,
0xbd
,
0x98
,
0x28
,
0x31
,
0xc6
,
0xe7
,
0xa8
,
0x85
,
0x29
,
0x21
,
0x75
,
0x20
,
0xcb
,
0x27
,
0xe4
,
0xa1
,
0xc3
,
0x2b
,
0x6c
,
0x9c
,
0x9c
,
0xa2
,
0x2a
,
0xfc
,
0x30
,
0xef
,
0x72
,
0x0f
,
0x2f
,
0x1a
,
0xe5
,
0x0f
,
0x6f
,
0xfd
,
0xf8
,
0xd9
,
0x24
,
0xd3
,
0xd3
,
0xe5
,
0xd1
,
0x30
,
0x95
,
0xf3
,
0xdd
,
0xfd
,
0xfd
,
0x34
,
0xdf
,
0x4d
,
0xa7
,
0x22
,
0xcb
,
0xf7
,
0xf7
,
0x77
,
0xa9
,
0x48
,
0x47
,
0x6d
,
0xfa
,
0x17
,
0xb6
,
0xff
,
0x4f
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0x72
,
0xdc
,
0x53
,
0x0e
,
0xaf
,
0x0d
,
0x00
,
0x00
,
}
vendor/github.com/33cn/chain33/util/util.go
View file @
7c5ce435
...
...
@@ -478,7 +478,7 @@ func ExecAndCheckBlockCB(qclient queue.Client, block *types.Block, txs []*types.
//ResetDatadir 重写datadir
func
ResetDatadir
(
cfg
*
types
.
Config
,
datadir
string
)
string
{
// Check in case of paths like "/something/~/something/"
if
datadir
[
:
2
]
==
"~/"
{
if
len
(
datadir
)
>=
2
&&
datadir
[
:
2
]
==
"~/"
{
usr
,
err
:=
user
.
Current
()
if
err
!=
nil
{
panic
(
err
)
...
...
@@ -486,7 +486,7 @@ func ResetDatadir(cfg *types.Config, datadir string) string {
dir
:=
usr
.
HomeDir
datadir
=
filepath
.
Join
(
dir
,
datadir
[
2
:
])
}
if
datadir
[
:
6
]
==
"$TEMP/"
{
if
len
(
datadir
)
>=
6
&&
datadir
[
:
6
]
==
"$TEMP/"
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"chain33datadir-"
)
if
err
!=
nil
{
panic
(
err
)
...
...
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