Commit 8d8604b1 authored by king wang's avatar king wang

fix cli

parent cdf51d68
...@@ -49,7 +49,8 @@ update: ...@@ -49,7 +49,8 @@ update:
rm -rf ${CHAIN33_PATH} rm -rf ${CHAIN33_PATH}
git clone --depth 1 -b master https://${CHAIN33}.git ${CHAIN33_PATH} git clone --depth 1 -b master https://${CHAIN33}.git ${CHAIN33_PATH}
rm -rf vendor/${CHAIN33}/.git rm -rf vendor/${CHAIN33}/.git
cp -R vendor/${CHAIN33}/vendor/* vendor/ rm -rf vendor/${CHAIN33}/vendor/github.com/apache/thrift/tutorial/erl/
cp -Rf vendor/${CHAIN33}/vendor/* vendor/
rm -rf vendor/${CHAIN33}/vendor rm -rf vendor/${CHAIN33}/vendor
govendor init govendor init
go build -i -o tool gitlab.33.cn/chain33/plugin/vendor/gitlab.33.cn/chain33/chain33/cmd/tools go build -i -o tool gitlab.33.cn/chain33/plugin/vendor/gitlab.33.cn/chain33/chain33/cmd/tools
......
...@@ -4,9 +4,10 @@ package main ...@@ -4,9 +4,10 @@ package main
import ( import (
_ "gitlab.33.cn/chain33/chain33/system" _ "gitlab.33.cn/chain33/chain33/system"
"gitlab.33.cn/chain33/chain33/util/cli"
"gitlab.33.cn/chain33/plugin/cli/buildflags" "gitlab.33.cn/chain33/plugin/cli/buildflags"
_ "gitlab.33.cn/chain33/plugin/plugin" _ "gitlab.33.cn/chain33/plugin/plugin"
"gitlab.33.cn/chain33/chain33/util/cli"
) )
func main() { func main() {
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: blackwhite.proto // source: blackwhite.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1271,7 +1272,7 @@ func init() { proto.RegisterFile("blackwhite.proto", fileDescriptor0) } ...@@ -1271,7 +1272,7 @@ func init() { proto.RegisterFile("blackwhite.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 961 bytes of a gzipped FileDescriptorProto // 961 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcd, 0x8e, 0x1b, 0x45, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x57, 0xcd, 0x8e, 0x1b, 0x45,
0x10, 0xde, 0xf1, 0x78, 0xec, 0x6c, 0x79, 0xff, 0xd2, 0x24, 0x9b, 0xd6, 0x6a, 0x85, 0xac, 0x39, 0x10, 0xde, 0xf1, 0x78, 0xec, 0x6c, 0x79, 0xff, 0xd2, 0x24, 0x9b, 0xd6, 0x6a, 0x85, 0xac, 0x39,
0xa0, 0x95, 0x40, 0x4b, 0x30, 0x39, 0x43, 0x9c, 0x44, 0xd9, 0x8d, 0x14, 0x45, 0x56, 0xdb, 0x80, 0xa0, 0x95, 0x40, 0x4b, 0x30, 0x39, 0x43, 0x9c, 0x44, 0xd9, 0x8d, 0x14, 0x45, 0x56, 0xdb, 0x80,
0xc4, 0x89, 0x89, 0xdd, 0xc4, 0x23, 0xec, 0x19, 0x6f, 0x4f, 0x3b, 0x5e, 0x8b, 0x37, 0xe0, 0x0a, 0xc4, 0x89, 0x89, 0xdd, 0xc4, 0x23, 0xec, 0x19, 0x6f, 0x4f, 0x3b, 0x5e, 0x8b, 0x37, 0xe0, 0x0a,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: cert.proto // source: cert.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -349,7 +350,7 @@ func init() { proto.RegisterFile("cert.proto", fileDescriptor0) } ...@@ -349,7 +350,7 @@ func init() { proto.RegisterFile("cert.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 300 bytes of a gzipped FileDescriptorProto // 300 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xcd, 0x4a, 0xf3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x52, 0xcd, 0x4a, 0xf3, 0x40,
0x14, 0xed, 0x24, 0xfd, 0xbd, 0xfd, 0x28, 0x9f, 0x83, 0x48, 0x70, 0x21, 0x25, 0xab, 0x82, 0x10, 0x14, 0xed, 0x24, 0xfd, 0xbd, 0xfd, 0x28, 0x9f, 0x83, 0x48, 0x70, 0x21, 0x25, 0xab, 0x82, 0x10,
0xb0, 0xfa, 0x02, 0xd5, 0x4d, 0xdd, 0x14, 0x19, 0xea, 0x5a, 0xa6, 0xe9, 0xd5, 0x06, 0xd3, 0x4c, 0xb0, 0xfa, 0x02, 0xd5, 0x4d, 0xdd, 0x14, 0x19, 0xea, 0x5a, 0xa6, 0xe9, 0xd5, 0x06, 0xd3, 0x4c,
0x98, 0xde, 0x58, 0xe6, 0x79, 0x7c, 0x51, 0x99, 0x1f, 0x25, 0x82, 0x0b, 0xdd, 0xe5, 0xdc, 0x73, 0x98, 0xde, 0x58, 0xe6, 0x79, 0x7c, 0x51, 0x99, 0x1f, 0x25, 0x82, 0x0b, 0xdd, 0xe5, 0xdc, 0x73,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: evmcontract.proto // source: evmcontract.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -634,7 +635,7 @@ func init() { proto.RegisterFile("evmcontract.proto", fileDescriptor0) } ...@@ -634,7 +635,7 @@ func init() { proto.RegisterFile("evmcontract.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 716 bytes of a gzipped FileDescriptorProto // 716 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x6f, 0xd3, 0x4a, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x6f, 0xd3, 0x4a,
0x10, 0x96, 0x63, 0x27, 0x8d, 0x27, 0x79, 0xaf, 0xed, 0xbe, 0xf7, 0xfa, 0xac, 0x8a, 0x43, 0xb4, 0x10, 0x96, 0x63, 0x27, 0x8d, 0x27, 0x79, 0xaf, 0xed, 0xbe, 0xf7, 0xfa, 0xac, 0x8a, 0x43, 0xb4,
0xa2, 0x10, 0x21, 0x11, 0xa1, 0x72, 0x41, 0x3d, 0x20, 0x55, 0xa9, 0x55, 0x90, 0x08, 0xa0, 0xad, 0xa2, 0x10, 0x21, 0x11, 0xa1, 0x72, 0x41, 0x3d, 0x20, 0x55, 0xa9, 0x55, 0x90, 0x08, 0xa0, 0xad,
0x94, 0xfb, 0xd6, 0x5e, 0x52, 0xd3, 0xd8, 0x6b, 0xbc, 0xeb, 0x4a, 0xbd, 0xf2, 0x1b, 0xb8, 0x20, 0x94, 0xfb, 0xd6, 0x5e, 0x52, 0xd3, 0xd8, 0x6b, 0xbc, 0xeb, 0x4a, 0xbd, 0xf2, 0x1b, 0xb8, 0x20,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: game.proto // source: game.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -798,7 +799,7 @@ func init() { proto.RegisterFile("game.proto", fileDescriptor0) } ...@@ -798,7 +799,7 @@ func init() { proto.RegisterFile("game.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 712 bytes of a gzipped FileDescriptorProto // 712 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0xad, 0x93, 0x38, 0xa9, 0xc7, 0x4d, 0x69, 0x97, 0x08, 0x59, 0xa8, 0x82, 0xb0, 0xaa, 0x44, 0x10, 0xad, 0x93, 0x38, 0xa9, 0xc7, 0x4d, 0x69, 0x97, 0x08, 0x59, 0xa8, 0x82, 0xb0, 0xaa, 0x44,
0x54, 0x50, 0x0f, 0xe1, 0x04, 0x9c, 0xda, 0x4a, 0xb4, 0x95, 0xe0, 0xc0, 0x52, 0x71, 0xe2, 0x62, 0x54, 0x50, 0x0f, 0xe1, 0x04, 0x9c, 0xda, 0x4a, 0xb4, 0x95, 0xe0, 0xc0, 0x52, 0x71, 0xe2, 0x62,
0xec, 0xa5, 0x89, 0x94, 0xc4, 0x91, 0xbd, 0xa9, 0x9a, 0x5f, 0xe1, 0xb7, 0xf8, 0x04, 0xf8, 0x10, 0xec, 0xa5, 0x89, 0x94, 0xc4, 0x91, 0xbd, 0xa9, 0x9a, 0x5f, 0xe1, 0xb7, 0xf8, 0x04, 0xf8, 0x10,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: hashlock.proto // source: hashlock.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -424,7 +425,7 @@ func init() { proto.RegisterFile("hashlock.proto", fileDescriptor0) } ...@@ -424,7 +425,7 @@ func init() { proto.RegisterFile("hashlock.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 420 bytes of a gzipped FileDescriptorProto // 420 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcd, 0x6e, 0x9b, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x93, 0xcd, 0x6e, 0x9b, 0x40,
0x10, 0xc7, 0xbd, 0xd8, 0xd8, 0xf5, 0x60, 0xfb, 0xb0, 0xfd, 0x10, 0x87, 0xaa, 0x42, 0xa8, 0xaa, 0x10, 0xc7, 0xbd, 0xd8, 0xd8, 0xf5, 0x60, 0xfb, 0xb0, 0xfd, 0x10, 0x87, 0xaa, 0x42, 0xa8, 0xaa,
0x90, 0x2a, 0x59, 0xaa, 0xdb, 0x17, 0x70, 0x7b, 0xc1, 0x52, 0x4f, 0x9b, 0xe4, 0x1e, 0x02, 0x6b, 0x90, 0x2a, 0x59, 0xaa, 0xdb, 0x17, 0x70, 0x7b, 0xc1, 0x52, 0x4f, 0x9b, 0xe4, 0x1e, 0x02, 0x6b,
0xd9, 0x8a, 0xbd, 0xeb, 0x2c, 0x8b, 0x25, 0xf2, 0x18, 0x91, 0xf2, 0x2a, 0x79, 0x9c, 0x3c, 0x4b, 0xd9, 0x8a, 0xbd, 0xeb, 0x2c, 0x8b, 0x25, 0xf2, 0x18, 0x91, 0xf2, 0x2a, 0x79, 0x9c, 0x3c, 0x4b,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: lottery.proto // source: lottery.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1305,7 +1306,7 @@ func init() { proto.RegisterFile("lottery.proto", fileDescriptor0) } ...@@ -1305,7 +1306,7 @@ func init() { proto.RegisterFile("lottery.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1252 bytes of a gzipped FileDescriptorProto // 1252 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x6f, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x6f, 0xe3, 0x44,
0x10, 0xaf, 0xed, 0x38, 0x69, 0x26, 0x69, 0xee, 0xba, 0x2d, 0x3d, 0x53, 0x50, 0x55, 0x59, 0x3a, 0x10, 0xaf, 0xed, 0x38, 0x69, 0x26, 0x69, 0xee, 0xba, 0x2d, 0x3d, 0x53, 0x50, 0x55, 0x59, 0x3a,
0x54, 0xe9, 0x8e, 0x08, 0x02, 0x48, 0x08, 0x2a, 0xa4, 0xcb, 0x71, 0x28, 0x95, 0x7a, 0xbd, 0xd3, 0x54, 0xe9, 0x8e, 0x08, 0x02, 0x48, 0x08, 0x2a, 0xa4, 0xcb, 0x71, 0x28, 0x95, 0x7a, 0xbd, 0xd3,
0xb6, 0x27, 0x1e, 0x78, 0x72, 0xe3, 0xbd, 0xab, 0xd5, 0xc4, 0x0e, 0xf6, 0xfa, 0x5a, 0xbf, 0x21, 0xb6, 0x27, 0x1e, 0x78, 0x72, 0xe3, 0xbd, 0xab, 0xd5, 0xc4, 0x0e, 0xf6, 0xfa, 0x5a, 0xbf, 0x21,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: norm.proto // source: norm.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -219,7 +220,7 @@ func init() { proto.RegisterFile("norm.proto", fileDescriptor0) } ...@@ -219,7 +220,7 @@ func init() { proto.RegisterFile("norm.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 211 bytes of a gzipped FileDescriptorProto // 211 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc6, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc6, 0x30,
0x10, 0x84, 0x4d, 0xda, 0xfc, 0xc5, 0x55, 0x8a, 0x04, 0x91, 0x9c, 0x4a, 0x28, 0x1e, 0x72, 0x2a, 0x10, 0x84, 0x4d, 0xda, 0xfc, 0xc5, 0x55, 0x8a, 0x04, 0x91, 0x9c, 0x4a, 0x28, 0x1e, 0x72, 0x2a,
0xa8, 0x4f, 0xa0, 0x17, 0x95, 0x82, 0x48, 0xf0, 0x05, 0x6a, 0x5d, 0xa1, 0x68, 0x9b, 0x12, 0xb7, 0xa8, 0x4f, 0xa0, 0x17, 0x95, 0x82, 0x48, 0xf0, 0x05, 0x6a, 0x5d, 0xa1, 0x68, 0x9b, 0x12, 0xb7,
0x42, 0xde, 0x5e, 0x92, 0x56, 0x28, 0xe8, 0x2d, 0x93, 0x99, 0x9d, 0x6f, 0x59, 0x80, 0xc9, 0xf9, 0x42, 0xde, 0x5e, 0x92, 0x56, 0x28, 0xe8, 0x2d, 0x93, 0x99, 0x9d, 0x6f, 0x59, 0x80, 0xc9, 0xf9,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: paracross.proto // source: paracross.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1080,7 +1081,7 @@ func init() { proto.RegisterFile("paracross.proto", fileDescriptor0) } ...@@ -1080,7 +1081,7 @@ func init() { proto.RegisterFile("paracross.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 985 bytes of a gzipped FileDescriptorProto // 985 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4b, 0x6f, 0x23, 0x45, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x56, 0x4b, 0x6f, 0x23, 0x45,
0x10, 0xf6, 0x8c, 0xdf, 0xe5, 0xd8, 0x09, 0xbd, 0x89, 0x77, 0x34, 0x2c, 0xc8, 0x1a, 0x01, 0xb2, 0x10, 0xf6, 0x8c, 0xdf, 0xe5, 0xd8, 0x09, 0xbd, 0x89, 0x77, 0x34, 0x2c, 0xc8, 0x1a, 0x01, 0xb2,
0x38, 0x44, 0xc8, 0x91, 0x82, 0x10, 0xe2, 0xb0, 0x2f, 0xc5, 0x5a, 0x96, 0x05, 0x75, 0x22, 0x71, 0x38, 0x44, 0xc8, 0x91, 0x82, 0x10, 0xe2, 0xb0, 0x2f, 0xc5, 0x5a, 0x96, 0x05, 0x75, 0x22, 0x71,
0x42, 0x62, 0x32, 0xee, 0xdd, 0x8c, 0xf0, 0xb8, 0xbd, 0xd3, 0xed, 0xdd, 0xe4, 0xce, 0x91, 0x33, 0x42, 0x62, 0x32, 0xee, 0xdd, 0x8c, 0xf0, 0xb8, 0xbd, 0xd3, 0xed, 0xdd, 0xe4, 0xce, 0x91, 0x33,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: pokerbull.proto // source: pokerbull.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1186,7 +1187,7 @@ func init() { proto.RegisterFile("pokerbull.proto", fileDescriptor0) } ...@@ -1186,7 +1187,7 @@ func init() { proto.RegisterFile("pokerbull.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 984 bytes of a gzipped FileDescriptorProto // 984 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xae, 0xe3, 0x38, 0x3f, 0xc7, 0xdb, 0xa4, 0x1d, 0xa0, 0xb2, 0x2a, 0x84, 0x22, 0x6f, 0x59, 0x14, 0xae, 0xe3, 0x38, 0x3f, 0xc7, 0xdb, 0xa4, 0x1d, 0xa0, 0xb2, 0x2a, 0x84, 0x22, 0x6f, 0x59,
0x02, 0x5a, 0x7a, 0x91, 0x22, 0xd0, 0x0a, 0x09, 0x29, 0xe1, 0x82, 0x56, 0x5a, 0xa1, 0x74, 0x5a, 0x02, 0x5a, 0x7a, 0x91, 0x22, 0xd0, 0x0a, 0x09, 0x29, 0xe1, 0x82, 0x56, 0x5a, 0xa1, 0x74, 0x5a,
0xb4, 0xd7, 0xde, 0x78, 0xb6, 0x6b, 0xad, 0xeb, 0xa4, 0xf6, 0xb8, 0xdb, 0xdc, 0xf2, 0x06, 0x3c, 0xb4, 0xd7, 0xde, 0x78, 0xb6, 0x6b, 0xad, 0xeb, 0xa4, 0xf6, 0xb8, 0xdb, 0xdc, 0xf2, 0x06, 0x3c,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: privacy.proto // source: privacy.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -2870,7 +2871,7 @@ func init() { proto.RegisterFile("privacy.proto", fileDescriptor0) } ...@@ -2870,7 +2871,7 @@ func init() { proto.RegisterFile("privacy.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 2393 bytes of a gzipped FileDescriptorProto // 2393 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x4f, 0x6f, 0x1c, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x5a, 0x4f, 0x6f, 0x1c, 0x49,
0x15, 0x77, 0xcf, 0x1f, 0xdb, 0xfd, 0x3c, 0xb6, 0x27, 0x9d, 0xb1, 0x77, 0x32, 0x89, 0xa2, 0x50, 0x15, 0x77, 0xcf, 0x1f, 0xdb, 0xfd, 0x3c, 0xb6, 0x27, 0x9d, 0xb1, 0x77, 0x32, 0x89, 0xa2, 0x50,
0xbb, 0x0a, 0x61, 0x41, 0x46, 0x6b, 0x2c, 0xed, 0x26, 0x04, 0x65, 0x3d, 0x8e, 0x93, 0x8c, 0xbc, 0xbb, 0x0a, 0x61, 0x41, 0x46, 0x6b, 0x2c, 0xed, 0x26, 0x04, 0x65, 0x3d, 0x8e, 0x93, 0x8c, 0xbc,
0x89, 0x4d, 0x79, 0x56, 0x20, 0xb4, 0x48, 0xd4, 0xcc, 0x94, 0xed, 0x96, 0x7b, 0xba, 0xdb, 0xdd, 0x89, 0x4d, 0x79, 0x56, 0x20, 0xb4, 0x48, 0xd4, 0xcc, 0x94, 0xed, 0x96, 0x7b, 0xba, 0xdb, 0xdd,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: relay.proto // source: relay.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1494,7 +1495,7 @@ func init() { proto.RegisterFile("relay.proto", fileDescriptor0) } ...@@ -1494,7 +1495,7 @@ func init() { proto.RegisterFile("relay.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1487 bytes of a gzipped FileDescriptorProto // 1487 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6e, 0xdb, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6e, 0xdb, 0x46,
0x13, 0x37, 0xc5, 0x3f, 0x96, 0x46, 0xb6, 0x23, 0xef, 0x17, 0xe7, 0xe3, 0x97, 0x2f, 0x68, 0x04, 0x13, 0x37, 0xc5, 0x3f, 0x96, 0x46, 0xb6, 0x23, 0xef, 0x17, 0xe7, 0xe3, 0x97, 0x2f, 0x68, 0x04,
0xa2, 0x2d, 0xdc, 0xa0, 0x70, 0x81, 0x04, 0x41, 0x81, 0xa2, 0x17, 0xcb, 0x87, 0x2a, 0x40, 0xd0, 0xa2, 0x2d, 0xdc, 0xa0, 0x70, 0x81, 0x04, 0x41, 0x81, 0xa2, 0x17, 0xcb, 0x87, 0x2a, 0x40, 0xd0,
0x24, 0x1b, 0xc3, 0x39, 0xf4, 0x44, 0x93, 0x6b, 0x6b, 0x11, 0x99, 0x54, 0xc8, 0x95, 0x22, 0xf5, 0x24, 0x1b, 0xc3, 0x39, 0xf4, 0x44, 0x93, 0x6b, 0x6b, 0x11, 0x99, 0x54, 0xc8, 0x95, 0x22, 0xf5,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: retrieve.proto // source: retrieve.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -677,7 +678,7 @@ func init() { proto.RegisterFile("retrieve.proto", fileDescriptor0) } ...@@ -677,7 +678,7 @@ func init() { proto.RegisterFile("retrieve.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 471 bytes of a gzipped FileDescriptorProto // 471 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xee, 0x3a, 0xd8, 0x29, 0x13, 0xea, 0x8a, 0x45, 0x54, 0x56, 0x0f, 0x95, 0x65, 0x21, 0x94, 0x10, 0xee, 0x3a, 0xd8, 0x29, 0x13, 0xea, 0x8a, 0x45, 0x54, 0x56, 0x0f, 0x95, 0x65, 0x21, 0x94,
0x0b, 0x41, 0x32, 0xbc, 0x40, 0xcb, 0x05, 0x6e, 0x61, 0x55, 0xae, 0xa0, 0xad, 0x3d, 0x41, 0x16, 0x0b, 0x41, 0x32, 0xbc, 0x40, 0xcb, 0x05, 0x6e, 0x61, 0x55, 0xae, 0xa0, 0xad, 0x3d, 0x41, 0x16,
0x8e, 0x6d, 0xd6, 0xeb, 0x0a, 0xdf, 0x78, 0x26, 0xde, 0x86, 0x0b, 0x2f, 0xc1, 0x0b, 0xa0, 0xec, 0x8e, 0x6d, 0xd6, 0xeb, 0x0a, 0xdf, 0x78, 0x26, 0xde, 0x86, 0x0b, 0x2f, 0xc1, 0x0b, 0xa0, 0xec,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: ticket.proto // source: ticket.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -966,7 +967,7 @@ func init() { proto.RegisterFile("ticket.proto", fileDescriptor0) } ...@@ -966,7 +967,7 @@ func init() { proto.RegisterFile("ticket.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 834 bytes of a gzipped FileDescriptorProto // 834 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xe3, 0x44,
0x14, 0x8e, 0xe3, 0x3a, 0x49, 0x5f, 0x9d, 0x96, 0x1d, 0x0a, 0xb2, 0x22, 0xb4, 0x8a, 0x46, 0x08, 0x14, 0x8e, 0xe3, 0x3a, 0x49, 0x5f, 0x9d, 0x96, 0x1d, 0x0a, 0xb2, 0x22, 0xb4, 0x8a, 0x46, 0x08,
0xb2, 0x80, 0x0a, 0x14, 0x84, 0x80, 0x0b, 0x6a, 0x2b, 0xb1, 0xa9, 0x44, 0x59, 0x69, 0xba, 0x5a, 0xb2, 0x80, 0x0a, 0x14, 0x84, 0x80, 0x0b, 0x6a, 0x2b, 0xb1, 0xa9, 0x44, 0x59, 0x69, 0xba, 0x5a,
0xc4, 0xd1, 0xb5, 0x5f, 0xb3, 0xa3, 0x3a, 0x63, 0x63, 0x4f, 0xda, 0xcd, 0x95, 0x03, 0xd2, 0x1e, 0xc4, 0xd1, 0xb5, 0x5f, 0xb3, 0xa3, 0x3a, 0x63, 0x63, 0x4f, 0xda, 0xcd, 0x95, 0x03, 0xd2, 0x1e,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: token.proto // source: token.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1098,7 +1099,7 @@ func init() { proto.RegisterFile("token.proto", fileDescriptor0) } ...@@ -1098,7 +1099,7 @@ func init() { proto.RegisterFile("token.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 939 bytes of a gzipped FileDescriptorProto // 939 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xdd, 0x6a, 0xe3, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xdc, 0x56, 0xdd, 0x6a, 0xe3, 0x46,
0x14, 0xb6, 0x2c, 0xff, 0xe9, 0x38, 0x71, 0xd6, 0xd3, 0x5d, 0x57, 0xa4, 0x4b, 0x09, 0xa2, 0x17, 0x14, 0xb6, 0x2c, 0xff, 0xe9, 0x38, 0x71, 0xd6, 0xd3, 0x5d, 0x57, 0xa4, 0x4b, 0x09, 0xa2, 0x17,
0x29, 0x94, 0x10, 0x12, 0x0a, 0xbd, 0x28, 0x14, 0x6f, 0xc9, 0xae, 0xfb, 0xc3, 0xb6, 0x4c, 0x05, 0x29, 0x94, 0x10, 0x12, 0x0a, 0xbd, 0x28, 0x14, 0x6f, 0xc9, 0xae, 0xfb, 0xc3, 0xb6, 0x4c, 0x05,
0xbd, 0xd6, 0x4a, 0x27, 0x89, 0x88, 0x2c, 0x39, 0xa3, 0xb1, 0x63, 0xbf, 0x44, 0x5f, 0xa1, 0xd0, 0xbd, 0xd6, 0x4a, 0x27, 0x89, 0x88, 0x2c, 0x39, 0xa3, 0xb1, 0x63, 0xbf, 0x44, 0x5f, 0xa1, 0xd0,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: trade.proto // source: trade.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -2043,7 +2044,7 @@ func init() { proto.RegisterFile("trade.proto", fileDescriptor0) } ...@@ -2043,7 +2044,7 @@ func init() { proto.RegisterFile("trade.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1246 bytes of a gzipped FileDescriptorProto // 1246 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x41, 0x6f, 0xdb, 0x36, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x58, 0x41, 0x6f, 0xdb, 0x36,
0x14, 0x8e, 0x2d, 0xcb, 0xb1, 0x9e, 0x63, 0xc7, 0x61, 0xdd, 0x4c, 0x0d, 0x76, 0x30, 0x84, 0x62, 0x14, 0x8e, 0x2d, 0xcb, 0xb1, 0x9e, 0x63, 0xc7, 0x61, 0xdd, 0x4c, 0x0d, 0x76, 0x30, 0x84, 0x62,
0x4b, 0x8b, 0x22, 0xc0, 0x52, 0x14, 0x18, 0xb0, 0x61, 0x43, 0x9c, 0xac, 0x73, 0xb7, 0x16, 0x1b, 0x4b, 0x8b, 0x22, 0xc0, 0x52, 0x14, 0x18, 0xb0, 0x61, 0x43, 0x9c, 0xac, 0x73, 0xb7, 0x16, 0x1b,
0x18, 0x0f, 0xd8, 0x55, 0xb6, 0xd8, 0x44, 0x88, 0x6c, 0x39, 0x22, 0xd5, 0x58, 0x7f, 0x65, 0x3b, 0x18, 0x0f, 0xd8, 0x55, 0xb6, 0xd8, 0x44, 0x88, 0x6c, 0x39, 0x22, 0xd5, 0x58, 0x7f, 0x65, 0x3b,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: tendermint.proto // source: tendermint.proto
// DO NOT EDIT!
/* /*
Package types is a generated protocol buffer package. Package types is a generated protocol buffer package.
...@@ -1148,7 +1149,7 @@ func init() { proto.RegisterFile("tendermint.proto", fileDescriptor0) } ...@@ -1148,7 +1149,7 @@ func init() { proto.RegisterFile("tendermint.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1450 bytes of a gzipped FileDescriptorProto // 1450 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x5b, 0x45, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x5b, 0x45,
0x10, 0xd7, 0x8b, 0xe3, 0x24, 0x1e, 0x3b, 0x7f, 0xd8, 0x92, 0xd6, 0x94, 0x20, 0x85, 0x55, 0x01, 0x10, 0xd7, 0x8b, 0xe3, 0x24, 0x1e, 0x3b, 0x7f, 0xd8, 0x92, 0xd6, 0x94, 0x20, 0x85, 0x55, 0x01,
0xab, 0xad, 0xd2, 0x2a, 0xa9, 0xc4, 0xa1, 0x14, 0x35, 0x4e, 0xaa, 0xa6, 0x90, 0xb4, 0xd6, 0xda, 0xab, 0xad, 0xd2, 0x2a, 0xa9, 0xc4, 0xa1, 0x14, 0x35, 0x4e, 0xaa, 0xa6, 0x90, 0xb4, 0xd6, 0xda,
0x2a, 0xe7, 0x8d, 0xbd, 0xd8, 0x0f, 0xec, 0xf7, 0x1e, 0x6f, 0xd7, 0xae, 0x83, 0xc4, 0x85, 0x03, 0x2a, 0xe7, 0x8d, 0xbd, 0xd8, 0x0f, 0xec, 0xf7, 0x1e, 0x6f, 0xd7, 0xae, 0x83, 0xc4, 0x85, 0x03,
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go.
// source: valnode.proto // source: valnode.proto
// DO NOT EDIT!
package types package types
...@@ -225,7 +226,7 @@ func init() { proto.RegisterFile("valnode.proto", fileDescriptor1) } ...@@ -225,7 +226,7 @@ func init() { proto.RegisterFile("valnode.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{ var fileDescriptor1 = []byte{
// 261 bytes of a gzipped FileDescriptorProto // 261 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0xc3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0xc3, 0x30,
0x14, 0xc7, 0x97, 0xd6, 0x74, 0xfa, 0xba, 0x0d, 0x09, 0x32, 0xca, 0x4e, 0x25, 0x4c, 0xe9, 0xa9, 0x14, 0xc7, 0x97, 0xd6, 0x74, 0xfa, 0xba, 0x0d, 0x09, 0x32, 0xca, 0x4e, 0x25, 0x4c, 0xe9, 0xa9,
0xc8, 0x3c, 0x08, 0xde, 0xdc, 0x69, 0x22, 0x78, 0x08, 0xc5, 0x7b, 0xbb, 0x3e, 0x5d, 0xb1, 0x26, 0xc8, 0x3c, 0x08, 0xde, 0xdc, 0x69, 0x22, 0x78, 0x08, 0xc5, 0x7b, 0xbb, 0x3e, 0x5d, 0xb1, 0x26,
0x5d, 0x9b, 0x4d, 0xfa, 0x15, 0xfc, 0xd4, 0xd2, 0x34, 0xd6, 0x83, 0xec, 0xf8, 0xcf, 0xef, 0xf7, 0x5d, 0x9b, 0x4d, 0xfa, 0x15, 0xfc, 0xd4, 0xd2, 0x34, 0xd6, 0x83, 0xec, 0xf8, 0xcf, 0xef, 0xf7,
......
package mpt package mpt
import ( import (
lru "github.com/hashicorp/golang-lru"
"gitlab.33.cn/chain33/chain33/common" "gitlab.33.cn/chain33/chain33/common"
clog "gitlab.33.cn/chain33/chain33/common/log" clog "gitlab.33.cn/chain33/chain33/common/log"
log "gitlab.33.cn/chain33/chain33/common/log/log15" log "gitlab.33.cn/chain33/chain33/common/log/log15"
......
[![pipeline status](https://gitlab.33.cn/chain33/chain33/badges/develop/pipeline.svg)](https://gitlab.33.cn/chain33/chain33/commits/master) [![pipeline status](https://gitlab.33.cn/chain33/chain33/badges/master/pipeline.svg)](https://gitlab.33.cn/chain33/chain33/commits/master)
[![coverage report](https://gitlab.33.cn/chain33/chain33/badges/develop/coverage.svg)](https://gitlab.33.cn/chain33/chain33/commits/master) [![coverage report](https://gitlab.33.cn/chain33/chain33/badges/master/coverage.svg)](https://gitlab.33.cn/chain33/chain33/commits/master)
[![Go Report Card](https://goreportcard.com/badge/gitlab.33.cn/chain33/chain33)](https://goreportcard.com/report/gitlab.33.cn/chain33/chain33) [![Go Report Card](https://goreportcard.com/badge/gitlab.33.cn/chain33/chain33)](https://goreportcard.com/report/gitlab.33.cn/chain33/chain33)
# Chain33 Core Developer Edition # Chain33 Core Developer Edition
......
...@@ -64,30 +64,43 @@ echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" ...@@ -64,30 +64,43 @@ echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME"
echo "CLI=$CLI" echo "CLI=$CLI"
#################### ####################
testtoml=chain33.toml
function base_init() { function base_init() {
# update test environment # update test environment
sed -i $sedfix 's/^Title.*/Title="local"/g' chain33.toml sed -i $sedfix 's/^Title.*/Title="local"/g' ${testtoml}
sed -i $sedfix 's/^TestNet=.*/TestNet=true/g' chain33.toml sed -i $sedfix 's/^TestNet=.*/TestNet=true/g' ${testtoml}
# p2p # p2p
sed -i $sedfix 's/^seeds=.*/seeds=["chain33:13802","chain32:13802","chain31:13802"]/g' chain33.toml sed -i $sedfix 's/^seeds=.*/seeds=["chain33:13802","chain32:13802","chain31:13802"]/g' ${testtoml}
#sed -i $sedfix 's/^enable=.*/enable=true/g' chain33.toml #sed -i $sedfix 's/^enable=.*/enable=true/g' chain33.toml
sed -i $sedfix '0,/^enable=.*/s//enable=true/' chain33.toml sed -i $sedfix '0,/^enable=.*/s//enable=true/' ${testtoml}
sed -i $sedfix 's/^isSeed=.*/isSeed=true/g' chain33.toml sed -i $sedfix 's/^isSeed=.*/isSeed=true/g' ${testtoml}
sed -i $sedfix 's/^innerSeedEnable=.*/innerSeedEnable=false/g' chain33.toml sed -i $sedfix 's/^innerSeedEnable=.*/innerSeedEnable=false/g' ${testtoml}
sed -i $sedfix 's/^useGithub=.*/useGithub=false/g' chain33.toml sed -i $sedfix 's/^useGithub=.*/useGithub=false/g' ${testtoml}
# rpc # rpc
sed -i $sedfix 's/^jrpcBindAddr=.*/jrpcBindAddr="0.0.0.0:8801"/g' chain33.toml sed -i $sedfix 's/^jrpcBindAddr=.*/jrpcBindAddr="0.0.0.0:8801"/g' ${testtoml}
sed -i $sedfix 's/^grpcBindAddr=.*/grpcBindAddr="0.0.0.0:8802"/g' chain33.toml sed -i $sedfix 's/^grpcBindAddr=.*/grpcBindAddr="0.0.0.0:8802"/g' ${testtoml}
sed -i $sedfix 's/^whitelist=.*/whitelist=["localhost","127.0.0.1","0.0.0.0"]/g' chain33.toml sed -i $sedfix 's/^whitelist=.*/whitelist=["localhost","127.0.0.1","0.0.0.0"]/g' ${testtoml}
# wallet # wallet
sed -i $sedfix 's/^minerdisable=.*/minerdisable=false/g' chain33.toml sed -i $sedfix 's/^minerdisable=.*/minerdisable=false/g' ${testtoml}
#consens
consens_init "solo"
} }
function consens_init() {
if [ "$1" == "solo" ]; then
sed -i $sedfix 's/^name="ticket"/name="solo"/g' ${testtoml}
sed -i $sedfix 's/^singleMode=false/singleMode=true/g' ${testtoml}
fi
}
function start() { function start() {
echo "=========== # docker-compose ps =============" echo "=========== # docker-compose ps ============="
docker-compose ps docker-compose ps
...@@ -99,35 +112,20 @@ function start() { ...@@ -99,35 +112,20 @@ function start() {
#docker-compose -f docker-compose.yml -f docker-compose-paracross.yml -f docker-compose-relay.yml up --build -d #docker-compose -f docker-compose.yml -f docker-compose-paracross.yml -f docker-compose-relay.yml up --build -d
docker-compose up --build -d docker-compose up --build -d
local SLEEP=30 local SLEEP=5
echo "=========== sleep ${SLEEP}s =============" echo "=========== sleep ${SLEEP}s ============="
sleep ${SLEEP} sleep ${SLEEP}
docker-compose ps docker-compose ps
# query node run status # query node run status
check_docker_status
${CLI} block last_header ${CLI} block last_header
${CLI} net info ${CLI} net info
${CLI} net peer_info ${CLI} net peer_info
peersCount=$(${CLI} net peer_info | jq '.[] | length') peersCount=$(${CLI} net peer_info | jq '.[] | length')
echo "${peersCount}" echo "peersCount=${peersCount}"
if [ "${peersCount}" -lt 2 ]; then
sleep 20
peersCount=$(${CLI} net peer_info | jq '.[] | length')
echo "${peersCount}"
if [ "${peersCount}" -lt 2 ]; then
echo "peers error"
exit 1
fi
fi
#echo "=========== # create seed for wallet ============="
#seed=$(${CLI} seed generate -l 0 | jq ".seed")
#if [ -z "${seed}" ]; then
# echo "create seed error"
# exit 1
#fi
echo "=========== # save seed to wallet =============" echo "=========== # save seed to wallet ============="
result=$(${CLI} seed save -p 1314 -s "tortoise main civil member grace happy century convince father cage beach hip maid merry rib" | jq ".isok") result=$(${CLI} seed save -p 1314 -s "tortoise main civil member grace happy century convince father cage beach hip maid merry rib" | jq ".isok")
...@@ -162,19 +160,12 @@ function start() { ...@@ -162,19 +160,12 @@ function start() {
exit 1 exit 1
fi fi
sleep 1 block_wait 1
echo "=========== # close auto mining ============="
result=$(${CLI} wallet auto_mine -f 0 | jq ".isok")
if [ "${result}" = "false" ]; then
exit 1
fi
block_wait "${CLI}" 1
echo "=========== check genesis hash ========== " echo "=========== check genesis hash ========== "
${CLI} block hash -t 0 ${CLI} block hash -t 0
res=$(${CLI} block hash -t 0 | jq ".hash") res=$(${CLI} block hash -t 0 | jq ".hash")
count=$(echo "$res" | grep -c "0x67c58d6ba9175313f0468ae4e0ddec946549af7748037c2fdd5d54298afd20b6") count=$(echo "$res" | grep -c "0xfd39dbdbd2cdeb9f34bcec3612735671b35e2e2dbf9a4e6e3ed0c34804a757bb")
if [ "${count}" != 1 ]; then if [ "${count}" != 1 ]; then
echo "genesis hash error!" echo "genesis hash error!"
exit 1 exit 1
...@@ -184,33 +175,54 @@ function start() { ...@@ -184,33 +175,54 @@ function start() {
${CLI} block last_header ${CLI} block last_header
result=$(${CLI} block last_header | jq ".height") result=$(${CLI} block last_header | jq ".height")
if [ "${result}" -lt 1 ]; then if [ "${result}" -lt 1 ]; then
block_wait "${CLI}" 2 block_wait 2
fi fi
sync_status "${CLI}" # sync_status "${CLI}"
${CLI} wallet status ${CLI} wallet status
${CLI} account list ${CLI} account list
${CLI} mempool list ${CLI} mempool list
} }
function check_docker_status() {
status=$(docker-compose ps | grep chain33_1 | awk '{print $6}')
if [ "${status}" == "Exit" ]; then
echo "=========== chain33 service Exit logs ========== "
docker-compose logs chain33
echo "=========== chain33 service Exit logs End========== "
fi
}
function block_wait() { function block_wait() {
sleep "$1"
}
function block_wait_by_height() {
if [ "$#" -lt 2 ]; then if [ "$#" -lt 2 ]; then
echo "wrong block_wait params" echo "wrong block_wait params"
exit 1 exit 1
fi fi
cur_height=$(${1} block last_header | jq ".height")
expect=$((cur_height + ${2})) cur_height=$1
count=0 # shellcheck disable=SC2004
expect=$(($1 + $2))
count=100
while true; do while true; do
new_height=$(${1} block last_header | jq ".height") new_height=$(${CLI} block last_header | jq ".height")
if [ "${new_height}" -ge "${expect}" ]; then if [ "${new_height}" -ge "${expect}" ]; then
break break
fi fi
count=$((count + 1)) count=$((count - 1))
if [ $count -le 0 ]; then
exit 1
fi
echo "wait new block, cur height=$new_height,expect=$expect"
sleep 1 sleep 1
done done
echo "wait new block $count s, cur height=$expect,old=$cur_height" echo "wait new block remain $count s, cur height=$new_height,old=$cur_height"
} }
function check_docker_container() { function check_docker_container() {
...@@ -262,18 +274,23 @@ function sync() { ...@@ -262,18 +274,23 @@ function sync() {
function transfer() { function transfer() {
echo "=========== # transfer =============" echo "=========== # transfer ============="
${CLI} block last_header
curHeight=$(${CLI} block last_header | jq ".height")
echo "curheight=$curHeight"
hashes=() hashes=()
for ((i = 0; i < 10; i++)); do for ((i = 0; i < 10; i++)); do
hash=$(${CLI} send coins transfer -a 1 -n test -t 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -k 4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01) hash=$(${CLI} send coins transfer -a 1 -n test -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944)
echo "$hash"
hashes=("${hashes[@]}" "$hash") hashes=("${hashes[@]}" "$hash")
done done
block_wait "${CLI}" 1
block_wait_by_height "$curHeight", 1
echo "len: ${#hashes[@]}" echo "len: ${#hashes[@]}"
if [ "${#hashes[@]}" != 10 ]; then if [ "${#hashes[@]}" != 10 ]; then
echo "tx number wrong" echo "tx number wrong"
exit 1 exit 1
fi fi
for ((i = 0; i < ${#hashes[*]}; i++)); do for ((i = 0; i < ${#hashes[*]}; i++)); do
txs=$(${CLI} tx query_hash -s "${hashes[$i]}" | jq ".txs") txs=$(${CLI} tx query_hash -s "${hashes[$i]}" | jq ".txs")
if [ -z "${txs}" ]; then if [ -z "${txs}" ]; then
...@@ -282,28 +299,17 @@ function transfer() { ...@@ -282,28 +299,17 @@ function transfer() {
fi fi
done done
echo "=========== # withdraw =============" ${CLI} account balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e coins
hash=$(${CLI} send coins transfer -a 2 -n deposit -t 1wvmD6RNHzwhY4eN75WnM6JcaAvNQ4nHx -k CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944) balance=$(${CLI} account balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e coins | jq -r ".balance")
echo "${hash}" if [ "${balance}" != "10.0000" ]; then
block_wait "${CLI}" 1 echo "wrong balance=$balance, should not be 10.0000"
before=$(${CLI} account balance -a 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -e retrieve | jq -r ".balance")
if [ "${before}" == "0.0000" ]; then
echo "wrong ticket balance, should not be zero"
exit 1 exit 1
fi fi
hash=$(${CLI} send coins withdraw -a 1 -n withdraw -e retrieve -k CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944)
echo "${hash}"
block_wait "${CLI}" 1
txs=$(${CLI} tx query_hash -s "${hash}" | jq ".txs")
if [ "${txs}" == "null" ]; then
echo "withdraw cannot find tx"
exit 1
fi
} }
function base_config() { function base_config() {
sync # sync
transfer transfer
} }
......
...@@ -98,6 +98,13 @@ targetTimePerBlock = 15 ...@@ -98,6 +98,13 @@ targetTimePerBlock = 15
[mver.consensus.ForkChainParamV2] [mver.consensus.ForkChainParamV2]
powLimitBits = "0x1f2fffff" powLimitBits = "0x1f2fffff"
[consensus.sub.solo]
genesis="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
genesisBlockTime=1514533394
hotkeyAddr="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
waitTxMs=10
[consensus.sub.ticket] [consensus.sub.ticket]
genesisBlockTime=1514533394 genesisBlockTime=1514533394
[[consensus.sub.ticket.genesis]] [[consensus.sub.ticket.genesis]]
......
...@@ -240,13 +240,6 @@ func (this *importPackageStrategy) fetchPlugin(gitrepo, version string) error { ...@@ -240,13 +240,6 @@ func (this *importPackageStrategy) fetchPlugin(gitrepo, version string) error {
return cmd.Run() return cmd.Run()
} }
func runcmd(action string, param string) error {
cmd := exec.Command("govendor", action, param)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}
// fetchPluginPackage 使用govendor来下载依赖包 // fetchPluginPackage 使用govendor来下载依赖包
func (this *importPackageStrategy) fetchPluginPackage() error { func (this *importPackageStrategy) fetchPluginPackage() error {
mlog.Info("下载插件源码包") mlog.Info("下载插件源码包")
......
...@@ -54,10 +54,10 @@ func init() { ...@@ -54,10 +54,10 @@ func init() {
sendCmd, sendCmd,
closeCmd, closeCmd,
) )
pluginmgr.AddCmd(rootCmd)
} }
func Run(RPCAddr, ParaName string) { func Run(RPCAddr, ParaName string) {
pluginmgr.AddCmd(rootCmd)
log.SetLogLevel("error") log.SetLogLevel("error")
types.S("RPCAddr", RPCAddr) types.S("RPCAddr", RPCAddr)
types.S("ParaName", ParaName) types.S("ParaName", ParaName)
......
...@@ -197,7 +197,7 @@ func (wallet *Wallet) IsRescanUtxosFlagScaning() (bool, error) { ...@@ -197,7 +197,7 @@ func (wallet *Wallet) IsRescanUtxosFlagScaning() (bool, error) {
return flag, err return flag, err
} }
return flag, types.ErrNotSupport return flag, nil
} }
func (wallet *Wallet) Close() { func (wallet *Wallet) Close() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment