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
57808324
Commit
57808324
authored
Jan 08, 2020
by
heyubin
Browse files
Options
Browse Files
Download
Plain Diff
add by hybh for conflicts
parents
1727e318
1e0f7be7
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
51 additions
and
64 deletions
+51
-64
docker-compose.sh
build/docker-compose.sh
+6
-2
system-fork-test.sh
build/system-fork-test.sh
+5
-5
go.mod
go.mod
+6
-5
go.sum
go.sum
+8
-25
block.go
plugin/consensus/raft/block.go
+1
-1
store.go
plugin/consensus/tendermint/store.go
+1
-1
game_test.go
plugin/dapp/guess/commands/game_test.go
+20
-17
fork-test.sh
plugin/dapp/privacy/cmd/test/fork-test.sh
+1
-1
relaydb_test.go
plugin/dapp/relay/executor/relaydb_test.go
+1
-1
storagedb.go
plugin/dapp/storage/executor/storagedb.go
+1
-1
test-rpc.sh
plugin/dapp/unfreeze/cmd/test/test-rpc.sh
+1
-5
No files found.
build/docker-compose.sh
View file @
57808324
...
...
@@ -102,6 +102,10 @@ function base_init() {
sed
-i
$sedfix
's/^nodeGroupFrozenCoins=.*/nodeGroupFrozenCoins=20/g'
chain33.toml
sed
-i
$sedfix
's/^paraConsensusStopBlocks=.*/paraConsensusStopBlocks=100/g'
chain33.toml
# blockchain
# TODO 剩下evm trade 测试和这个选项有关,在其他pr中解决,不使得这个pr太大
sed
-i
$sedfix
's/^enableReduceLocaldb=.*/enableReduceLocaldb=false/g'
chain33.toml
# ticket
sed
-i
$sedfix
's/^ticketPrice =.*/ticketPrice = 10000/g'
chain33.toml
...
...
@@ -132,10 +136,10 @@ function start() {
${
CLI
}
block last_header
${
CLI
}
net info
${
CLI
}
net peer
_info
${
CLI
}
net peer
local
count
=
1000
while
[
$count
-gt
0
]
;
do
peersCount
=
$(${
CLI
}
net peer
_info
| jq
'.[] | length'
)
peersCount
=
$(${
CLI
}
net peer | jq
'.[] | length'
)
if
[
"
${
peersCount
}
"
-ge
2
]
;
then
break
fi
...
...
build/system-fork-test.sh
View file @
57808324
...
...
@@ -111,12 +111,12 @@ function start() {
${
CLI
}
block last_header
${
CLI
}
net info
${
CLI
}
net peer
_info
peersCount
=
$(${
CLI
}
net peer
_info
| jq
'.[] | length'
)
${
CLI
}
net peer
peersCount
=
$(${
CLI
}
net peer | jq
'.[] | length'
)
echo
"
${
peersCount
}
"
if
[
"
${
peersCount
}
"
-lt
2
]
;
then
sleep
20
peersCount
=
$(${
CLI
}
net peer
_info
| jq
'.[] | length'
)
peersCount
=
$(${
CLI
}
net peer | jq
'.[] | length'
)
echo
"
${
peersCount
}
"
if
[
"
${
peersCount
}
"
-lt
2
]
;
then
echo
"peers error"
...
...
@@ -738,7 +738,7 @@ function peersCount() {
needCount
=
$3
for
((
i
=
0
;
i <
time
;
i++
))
;
do
peersCount
=
$(
$name
net peer
_info
| jq
'.[] | length'
)
peersCount
=
$(
$name
net peer | jq
'.[] | length'
)
printf
'查询节点 %s ,所需节点数 %d ,当前节点数 %s \n'
"
${
name
}
"
"
${
needCount
}
"
"
${
peersCount
}
"
if
[
"
${
peersCount
}
"
=
"
$needCount
"
]
;
then
echo
"============= 符合节点数要求 ============="
...
...
@@ -795,7 +795,7 @@ function checkBlockHashfun() {
fi
fi
peersCount
=
0
peersCount
=
$(${
forkContainers
[0]
}
net peer
_info
| jq
'.[] | length'
)
peersCount
=
$(${
forkContainers
[0]
}
net peer | jq
'.[] | length'
)
printf
'第 %d 次,未查询到网络同步,当前节点数 %d 个,100s后查询\n'
$j
"
${
peersCount
}
"
sleep
100
#检查是否超过了最大检测次数
...
...
go.mod
View file @
57808324
...
...
@@ -6,6 +6,7 @@ require (
github.com/33cn/chain33 v0.0.0-20200108042336-2dda2dfb7e0e
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd v0.0.0-20181013004428-67e573d211ac
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d // indirect
...
...
@@ -16,14 +17,14 @@ require (
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/davecgh/go-spew v1.1.1
github.com/gogo/protobuf v1.3.0
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.
3.2
github.com/golang/protobuf v1.
2.0
github.com/hashicorp/golang-lru v0.5.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/pkg/errors v0.8.0
github.com/prometheus/client_golang v1.1.0 // indirect
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/common v0.4.1 // indirect
github.com/prometheus/procfs v0.0.3 // indirect
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
github.com/rs/cors v1.6.0
github.com/spf13/cobra v0.0.3
...
...
go.sum
View file @
57808324
...
...
@@ -22,7 +22,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/apache/thrift v0.0.0-20171203172758-327ebb6c2b6d h1:b/FqDLjWXDQI6XBYvWDVgEKv3xOTs68qRkuqyU37lBc=
github.com/apache/thrift v0.0.0-20171203172758-327ebb6c2b6d/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
...
...
@@ -65,12 +64,10 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4=
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
...
...
@@ -78,14 +75,10 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/haltingstate/secp256k1-go v0.0.0-20151224084235-572209b26df6 h1:HE4YDtvtpZgjRJ2tCOmaXlcpBTFG2e0jvfNntM5sXOs=
github.com/haltingstate/secp256k1-go v0.0.0-20151224084235-572209b26df6/go.mod h1:73mKQiY8bLnscfGakn57WAJZTzT0eSUAy3qgMQNR/DI=
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
...
...
@@ -99,11 +92,7 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA=
github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.8.2 h1:Bx0qjetmNjdFXASH02NSAREKpiaDwkO1DRZ3dV2KCcs=
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w=
...
...
@@ -121,10 +110,6 @@ github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ=
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
...
...
@@ -138,17 +123,16 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.
2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA
=
github.com/prometheus/procfs v0.0.
0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk
=
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d h1:1VUlQbCfkoSGv7qP7Y+ro3ap1P1pPZxgdGVqiTVy5C4=
...
...
@@ -194,9 +178,9 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
...
...
@@ -206,13 +190,13 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
...
...
@@ -221,7 +205,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
...
...
plugin/consensus/raft/block.go
View file @
57808324
...
...
@@ -209,7 +209,7 @@ func (client *Client) CreateBlock() {
// 向raft底层发送block
func
(
client
*
Client
)
propose
(
block
*
types
.
Block
)
{
client
.
proposeC
<-
block
client
.
proposeC
<-
block
.
Clone
()
}
// 从receive channel中读leader发来的block
...
...
plugin/consensus/tendermint/store.go
View file @
57808324
...
...
@@ -6,7 +6,7 @@ import (
dbm
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
tmtypes
"github.com/33cn/plugin/plugin/dapp/valnode/types"
"github.com/go
go
/protobuf/proto"
"github.com/go
lang
/protobuf/proto"
)
var
(
...
...
plugin/dapp/guess/commands/game_test.go
View file @
57808324
...
...
@@ -41,6 +41,9 @@ import (
var
(
secp
crypto
.
Crypto
jrpcURL
=
"127.0.0.1:8803"
grpcURL
=
"127.0.0.1:8804"
config
=
`# Title为local,表示此配置文件为本地单节点的配置。此时本地节点所在的链上只有这一个节点,共识模块一般采用solo模式。
Title="local"
TestNet=true
...
...
@@ -119,9 +122,9 @@ verMix=200
verMax=200
[rpc]
# jrpc绑定地址
jrpcBindAddr="localhost:880
1
"
jrpcBindAddr="localhost:880
3
"
# grpc绑定地址
grpcBindAddr="localhost:880
2
"
grpcBindAddr="localhost:880
4
"
# 白名单列表,允许访问的IP地址,默认是“*”,允许所有IP访问
whitelist=["127.0.0.1"]
# jrpc方法请求白名单,默认是“*”,允许访问所有RPC方法
...
...
@@ -476,7 +479,7 @@ func initEnvGuess() (queue.Queue, *blockchain.BlockChain, queue.Module, queue.Mo
func
createConn
()
error
{
var
err
error
url
:=
"127.0.0.1:8802"
url
:=
grpcURL
fmt
.
Println
(
"grpc url:"
,
url
)
conn
,
err
=
grpc
.
Dial
(
url
,
grpc
.
WithInsecure
())
if
err
!=
nil
{
...
...
@@ -632,47 +635,47 @@ func testCmd(cmd *cobra.Command) {
rootCmd
.
PersistentFlags
()
.
String
(
"title"
,
chain33Cfg
.
GetTitle
(),
"get title name"
)
rootCmd
.
PersistentFlags
()
.
String
(
"rpc_laddr"
,
"http://
127.0.0.1:8802"
,
"http url"
)
rootCmd
.
PersistentFlags
()
.
String
(
"rpc_laddr"
,
"http://
"
+
grpcURL
,
"http url"
)
rootCmd
.
AddCommand
(
cmd
)
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"start"
,
"--topic"
,
"WorldCup Final"
,
"--options"
,
"A:France;B:Claodia"
,
"--category"
,
"football"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"start"
,
"--topic"
,
"WorldCup Final"
,
"--options"
,
"A:France;B:Claodia"
,
"--category"
,
"football"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
strGameID
:=
"0x20d78aabfa67701f7492261312575614f684b084efa2c13224f1505706c846e8"
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"bet"
,
"--gameId"
,
strGameID
,
"--option"
,
"A"
,
"--betsNumber"
,
"500000000"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"bet"
,
"--gameId"
,
strGameID
,
"--option"
,
"A"
,
"--betsNumber"
,
"500000000"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"stop"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"stop"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"abort"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"abort"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"publish"
,
"--gameId"
,
strGameID
,
"--result"
,
"A"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"publish"
,
"--gameId"
,
strGameID
,
"--result"
,
"A"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"ids"
,
"--gameIDs"
,
strGameID
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"ids"
,
"--gameIDs"
,
strGameID
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"id"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"id"
,
"--gameId"
,
strGameID
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"addr"
,
"--addr"
,
userAAddr
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"addr"
,
"--addr"
,
userAAddr
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"status"
,
"--status"
,
"10"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"status"
,
"--status"
,
"10"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"adminAddr"
,
"--adminAddr"
,
adminAddr
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"adminAddr"
,
"--adminAddr"
,
adminAddr
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"addrStatus"
,
"--addr"
,
userAAddr
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"addrStatus"
,
"--addr"
,
userAAddr
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"adminStatus"
,
"--adminAddr"
,
adminAddr
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"adminStatus"
,
"--adminAddr"
,
adminAddr
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"categoryStatus"
,
"--category"
,
"football"
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
127.0.0.1:8801"
})
rootCmd
.
SetArgs
([]
string
{
"guess"
,
"query"
,
"--type"
,
"categoryStatus"
,
"--category"
,
"football"
,
"--status"
,
"11"
,
"--rpc_laddr"
,
"http://
"
+
jrpcURL
})
rootCmd
.
Execute
()
}
plugin/dapp/privacy/cmd/test/fork-test.sh
View file @
57808324
...
...
@@ -100,7 +100,7 @@ function peersCount() {
sleepTime
=
15
for
((
i
=
0
;
i < retryTime
;
i++
))
;
do
peersCount
=
$(
$name
net peer
_info
| jq
'.[] | length'
)
peersCount
=
$(
$name
net peer | jq
'.[] | length'
)
printf
'查询节点 %s ,所需节点数 %d ,当前节点数 %s \n'
"
${
name
}
"
"
${
needCount
}
"
"
${
peersCount
}
"
if
[
"
${
peersCount
}
"
=
"
$needCount
"
]
;
then
echo
"============= 符合节点数要求 ============="
...
...
plugin/dapp/relay/executor/relaydb_test.go
View file @
57808324
...
...
@@ -15,7 +15,7 @@ import (
"github.com/33cn/chain33/common/db/mocks"
"github.com/33cn/chain33/types"
ty
"github.com/33cn/plugin/plugin/dapp/relay/types"
"github.com/go
go
/protobuf/proto"
"github.com/go
lang
/protobuf/proto"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
)
...
...
plugin/dapp/storage/executor/storagedb.go
View file @
57808324
...
...
@@ -7,7 +7,7 @@ import (
dbm
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
storagetypes
"github.com/33cn/plugin/plugin/dapp/storage/types"
"github.com/go
go
/protobuf/proto"
"github.com/go
lang
/protobuf/proto"
)
type
StorageAction
struct
{
...
...
plugin/dapp/unfreeze/cmd/test/test-rpc.sh
View file @
57808324
...
...
@@ -25,9 +25,7 @@ function query_unfreezeID() {
exit
1
fi
else
unfreeze_id
=
$(
jq
'(.result.receipt.logs['
"
$uid_index
"
'].log.current.unfreezeID)'
<<<
"
$ret
"
)
unfreeze_id2
=
${
unfreeze_id
#\
"mavl-unfreeze-}
uid=
${
unfreeze_id2
%\
"}
uid
=
${
tx
#0x
}
echo
-e
"
${
GRE
}
====query tx=
$txhash
success
${
NOC
}
"
break
fi
...
...
@@ -38,7 +36,6 @@ function init() {
ispara
=
$(
echo
'"'
"
${
MAIN_HTTP
}
"
'"'
| jq
'.|contains("8901")'
)
echo
"ipara=
$ispara
"
exec_name
=
"unfreeze"
uid_index=2
symbol
=
"bty"
beneficiary_key
=
0xa2ec1c6274723c021daa8792f4d0d52ffa0eff0fd47c9c6c1d1dd618762dc178
...
...
@@ -55,7 +52,6 @@ function init() {
if
[
"
$ispara
"
==
true
]
;
then
exec_name
=
"user.p.para."
${
exec_name
}
uid_index=1
symbol
=
"para"
local
main_ip
=
${
MAIN_HTTP
//8901/8801
}
...
...
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