Commit 21fc4c47 authored by 郝东博's avatar 郝东博

fix misspell warning

parent 83795d85
......@@ -15,6 +15,7 @@ function filterLinter() {
--enable=varcheck \
--enable=structcheck \
--enable=goimports \
--enable=misspell \
--vendor ./...)
# --enable=staticcheck \
# --enable=gocyclo \
......
......@@ -148,5 +148,5 @@ func clearTestData() {
if err != nil {
fmt.Println("delete wallet have a err:", err.Error())
}
fmt.Println("test data clear sucessfully!")
fmt.Println("test data clear successfully!")
}
......@@ -175,5 +175,5 @@ func clearTestData() {
if err != nil {
fmt.Println("delete chain33_raft dir have a err:", err.Error())
}
fmt.Println("test data clear sucessfully!")
fmt.Println("test data clear successfully!")
}
......@@ -181,7 +181,7 @@ func remoteScp(si *ScpInfo, reqnum chan struct{}) {
}()
ScpFileFromLocalToRemote(si)
//session, err := sshconnect("ubuntu", "Fuzamei#123456", "raft15258.chinacloudapp.cn", 22)
fmt.Println("remoteScp file sucessfully!:")
fmt.Println("remoteScp file successfully!:")
}
......
......@@ -396,7 +396,7 @@ func (node *Node) stopAndRemovePeer(peer Peer, reason interface{}) {
peer.Stop()
}
// StopPeerForError called if error occured
// StopPeerForError called if error occurred
func (node *Node) StopPeerForError(peer Peer, reason interface{}) {
tendermintlog.Error("Stopping peer for error", "peer", peer, "err", reason)
addr, err := peer.RemoteAddr()
......
......@@ -161,7 +161,7 @@ func clearTestData() {
if err != nil {
fmt.Println("delete datadir have a err:", err.Error())
}
fmt.Println("test data clear sucessfully!")
fmt.Println("test data clear successfully!")
}
func NormPut() {
......
......@@ -528,26 +528,26 @@ func (a *action) getWinner(round *gt.BlackwhiteRound) ([]*addrResult, *gt.ReplyL
addrRes := round.AddrResult
loop := int(round.Loop)
for _, addres := range addrRes {
if len(addres.ShowSecret) > 0 && len(addres.HashValues) == loop {
for _, address := range addrRes {
if len(address.ShowSecret) > 0 && len(address.HashValues) == loop {
var isBlack []bool
// 加入分叉高度判断:分叉高度在ForkV25BlackWhite到ForkV25BlackWhiteV2之间的执行原来逻辑,大于ForkV25BlackWhiteV2执行新逻辑,
// 小于ForkV25BlackWhite则无法进入
if !types.IsDappFork(a.height, gt.BlackwhiteX, "ForkBlackWhiteV2") {
for _, hash := range addres.HashValues {
if bytes.Equal(common.Sha256([]byte(addres.ShowSecret+black)), hash) {
for _, hash := range address.HashValues {
if bytes.Equal(common.Sha256([]byte(address.ShowSecret+black)), hash) {
isBlack = append(isBlack, true)
} else if bytes.Equal(common.Sha256([]byte(addres.ShowSecret+white)), hash) {
} else if bytes.Equal(common.Sha256([]byte(address.ShowSecret+white)), hash) {
isBlack = append(isBlack, false)
} else {
isBlack = append(isBlack, false)
}
}
} else {
for i, hash := range addres.HashValues {
if bytes.Equal(common.Sha256([]byte(strconv.Itoa(i)+addres.ShowSecret+black)), hash) {
for i, hash := range address.HashValues {
if bytes.Equal(common.Sha256([]byte(strconv.Itoa(i)+address.ShowSecret+black)), hash) {
isBlack = append(isBlack, true)
} else if bytes.Equal(common.Sha256([]byte(strconv.Itoa(i)+addres.ShowSecret+white)), hash) {
} else if bytes.Equal(common.Sha256([]byte(strconv.Itoa(i)+address.ShowSecret+white)), hash) {
isBlack = append(isBlack, false)
} else {
isBlack = append(isBlack, false)
......@@ -555,8 +555,8 @@ func (a *action) getWinner(round *gt.BlackwhiteRound) ([]*addrResult, *gt.ReplyL
}
}
addresX := &resultCalc{
Addr: addres.Addr,
amount: addres.Amount,
Addr: address.Addr,
amount: address.Amount,
IsWin: true,
IsBlack: isBlack,
}
......
......@@ -217,7 +217,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
Loop: 4,
}
addres := &gt.AddressResult{
address := &gt.AddressResult{
Addr: "1",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -225,9 +225,9 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(3) + showSecret + white))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
addres = &gt.AddressResult{
address = &gt.AddressResult{
Addr: "2",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -235,9 +235,9 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(3) + showSecret + white))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
addres = &gt.AddressResult{
address = &gt.AddressResult{
Addr: "3",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -245,7 +245,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(3) + showSecret + black))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
round.AddrResult = addrRes
......@@ -257,7 +257,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
//t.Logf("winers1 is %v", winers)
//t.Logf("losers1 is %v", losers)
addres = &gt.AddressResult{
address = &gt.AddressResult{
Addr: "4",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -265,9 +265,9 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(3) + showSecret + black))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
addres = &gt.AddressResult{
address = &gt.AddressResult{
Addr: "5",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -275,7 +275,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(3) + showSecret + white))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
round.AddrResult = addrRes
......@@ -286,7 +286,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
//t.Logf("winers2 is %v", winers)
//t.Logf("losers2 is %v", losers)
addres = &gt.AddressResult{
address = &gt.AddressResult{
Addr: "6",
HashValues: [][]byte{common.Sha256([]byte(strconv.Itoa(0) + showSecret + black)),
common.Sha256([]byte(strconv.Itoa(1) + showSecret + white)),
......@@ -298,7 +298,7 @@ func Test_getWinnerAndLoser(t *testing.T) {
common.Sha256([]byte(strconv.Itoa(7) + showSecret + white))},
ShowSecret: showSecret,
}
addrRes = append(addrRes, addres)
addrRes = append(addrRes, address)
round.AddrResult = addrRes
......
......@@ -67,7 +67,7 @@ func (b BlackwhiteType) ActionName(tx *types.Transaction) string {
var g BlackwhiteAction
err := types.Decode(tx.Payload, &g)
if err != nil {
return "unkown-Blackwhite-action-err"
return "unknown-Blackwhite-action-err"
}
if g.Ty == BlackwhiteActionCreate && g.GetCreate() != nil {
return "BlackwhiteCreate"
......@@ -78,7 +78,7 @@ func (b BlackwhiteType) ActionName(tx *types.Transaction) string {
} else if g.Ty == BlackwhiteActionTimeoutDone && g.GetTimeoutDone() != nil {
return "BlackwhiteTimeoutDone"
}
return "unkown"
return "unknown"
}
// Amount ...
......
This diff is collapsed.
......@@ -106,7 +106,7 @@ func runDir(tt *testing.T, basePath string) {
}
func runCase(tt *testing.T, c VMCase, file string) {
tt.Logf("runing test case:%s in file:%s", c.name, file)
tt.Logf("running test case:%s in file:%s", c.name, file)
// 1 构建预置环境 pre
inst := evm.NewEVMExecutor()
......
This diff is collapsed.
This diff is collapsed.
......@@ -188,7 +188,7 @@ func estHashlock(t *testing.T) {
func estHashunlock(t *testing.T) {
fmt.Println("TestHashunlock start")
defer fmt.Println("TestHashunlock end")
//not sucess as time not enough
//not success as time not enough
time.Sleep(5 * time.Second)
err := unlock(secret)
if err != nil {
......
......@@ -34,7 +34,7 @@ message Hashlockquery {
message HashRecv {
bytes HashlockId = 1;
Hashlockquery Infomation = 2;
Hashlockquery Information = 2;
}
message HashlockUnlock {
......
This diff is collapsed.
......@@ -548,11 +548,11 @@ func (action *Action) GetCalculableHash(beg, end int64, randMolNum int64) ([]byt
return modify, nil
}
//random used for verfication in solo
//random used for verification in solo
func (action *Action) findLuckyNum(isSolo bool, lott *LotteryDB) int64 {
var num int64
if isSolo {
//used for internal verfication
//used for internal verification
num = 12345
} else {
randMolNum := (lott.TotalPurchasedTxNum+action.height-lott.LastTransToPurState)%3 + 2 //3~5
......
This diff is collapsed.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: norm.proto
/*
Package types is a generated protocol buffer package.
It is generated from these files:
norm.proto
It has these top-level messages:
Norm
NormAction
NormPut
NormGetKey
*/
package types
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
......@@ -32,15 +22,38 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Norm struct {
NormId []byte `protobuf:"bytes,1,opt,name=normId,proto3" json:"normId,omitempty"`
CreateTime int64 `protobuf:"varint,2,opt,name=createTime" json:"createTime,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
CreateTime int64 `protobuf:"varint,2,opt,name=createTime,proto3" json:"createTime,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Norm) Reset() { *m = Norm{} }
func (m *Norm) String() string { return proto.CompactTextString(m) }
func (*Norm) ProtoMessage() {}
func (*Norm) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (*Norm) Descriptor() ([]byte, []int) {
return fileDescriptor_4c505000707f0293, []int{0}
}
func (m *Norm) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Norm.Unmarshal(m, b)
}
func (m *Norm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Norm.Marshal(b, m, deterministic)
}
func (m *Norm) XXX_Merge(src proto.Message) {
xxx_messageInfo_Norm.Merge(m, src)
}
func (m *Norm) XXX_Size() int {
return xxx_messageInfo_Norm.Size(m)
}
func (m *Norm) XXX_DiscardUnknown() {
xxx_messageInfo_Norm.DiscardUnknown(m)
}
var xxx_messageInfo_Norm proto.InternalMessageInfo
func (m *Norm) GetNormId() []byte {
if m != nil {
......@@ -74,20 +87,43 @@ type NormAction struct {
// Types that are valid to be assigned to Value:
// *NormAction_Nput
Value isNormAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,5,opt,name=ty" json:"ty,omitempty"`
Ty int32 `protobuf:"varint,5,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NormAction) Reset() { *m = NormAction{} }
func (m *NormAction) String() string { return proto.CompactTextString(m) }
func (*NormAction) ProtoMessage() {}
func (*NormAction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (*NormAction) Descriptor() ([]byte, []int) {
return fileDescriptor_4c505000707f0293, []int{1}
}
func (m *NormAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormAction.Unmarshal(m, b)
}
func (m *NormAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NormAction.Marshal(b, m, deterministic)
}
func (m *NormAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_NormAction.Merge(m, src)
}
func (m *NormAction) XXX_Size() int {
return xxx_messageInfo_NormAction.Size(m)
}
func (m *NormAction) XXX_DiscardUnknown() {
xxx_messageInfo_NormAction.DiscardUnknown(m)
}
var xxx_messageInfo_NormAction proto.InternalMessageInfo
type isNormAction_Value interface {
isNormAction_Value()
}
type NormAction_Nput struct {
Nput *NormPut `protobuf:"bytes,1,opt,name=nput,oneof"`
Nput *NormPut `protobuf:"bytes,1,opt,name=nput,proto3,oneof"`
}
func (*NormAction_Nput) isNormAction_Value() {}
......@@ -158,7 +194,7 @@ func _NormAction_OneofSizer(msg proto.Message) (n int) {
switch x := m.Value.(type) {
case *NormAction_Nput:
s := proto.Size(x.Nput)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
......@@ -169,14 +205,37 @@ func _NormAction_OneofSizer(msg proto.Message) (n int) {
}
type NormPut struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NormPut) Reset() { *m = NormPut{} }
func (m *NormPut) String() string { return proto.CompactTextString(m) }
func (*NormPut) ProtoMessage() {}
func (*NormPut) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (*NormPut) Descriptor() ([]byte, []int) {
return fileDescriptor_4c505000707f0293, []int{2}
}
func (m *NormPut) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormPut.Unmarshal(m, b)
}
func (m *NormPut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NormPut.Marshal(b, m, deterministic)
}
func (m *NormPut) XXX_Merge(src proto.Message) {
xxx_messageInfo_NormPut.Merge(m, src)
}
func (m *NormPut) XXX_Size() int {
return xxx_messageInfo_NormPut.Size(m)
}
func (m *NormPut) XXX_DiscardUnknown() {
xxx_messageInfo_NormPut.DiscardUnknown(m)
}
var xxx_messageInfo_NormPut proto.InternalMessageInfo
func (m *NormPut) GetKey() string {
if m != nil {
......@@ -193,13 +252,36 @@ func (m *NormPut) GetValue() []byte {
}
type NormGetKey struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NormGetKey) Reset() { *m = NormGetKey{} }
func (m *NormGetKey) String() string { return proto.CompactTextString(m) }
func (*NormGetKey) ProtoMessage() {}
func (*NormGetKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (*NormGetKey) Descriptor() ([]byte, []int) {
return fileDescriptor_4c505000707f0293, []int{3}
}
func (m *NormGetKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormGetKey.Unmarshal(m, b)
}
func (m *NormGetKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NormGetKey.Marshal(b, m, deterministic)
}
func (m *NormGetKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_NormGetKey.Merge(m, src)
}
func (m *NormGetKey) XXX_Size() int {
return xxx_messageInfo_NormGetKey.Size(m)
}
func (m *NormGetKey) XXX_DiscardUnknown() {
xxx_messageInfo_NormGetKey.DiscardUnknown(m)
}
var xxx_messageInfo_NormGetKey proto.InternalMessageInfo
func (m *NormGetKey) GetKey() string {
if m != nil {
......@@ -215,9 +297,9 @@ func init() {
proto.RegisterType((*NormGetKey)(nil), "types.NormGetKey")
}
func init() { proto.RegisterFile("norm.proto", fileDescriptor0) }
func init() { proto.RegisterFile("norm.proto", fileDescriptor_4c505000707f0293) }
var fileDescriptor0 = []byte{
var fileDescriptor_4c505000707f0293 = []byte{
// 211 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc6, 0x30,
0x10, 0x84, 0x4d, 0xda, 0xfc, 0xc5, 0x55, 0x8a, 0x04, 0x91, 0x9c, 0x4a, 0x28, 0x1e, 0x72, 0x2a,
......
This diff is collapsed.
......@@ -520,9 +520,9 @@ func (action *Action) checkPlayerExistInGame() bool {
}
var value pkt.PBGameRecord
lenght := len(values)
if lenght != 0 {
valueBytes := values[lenght-1]
length := len(values)
if length != 0 {
valueBytes := values[length-1]
err := types.Decode(valueBytes, &value)
if err == nil && value.Status == pkt.PBGameActionQuit {
return false
......
This diff is collapsed.
......@@ -499,7 +499,7 @@ func showPrivacyAccountInfoFlag(cmd *cobra.Command) {
cmd.MarkFlagRequired("addr")
cmd.Flags().StringP("token", "t", types.BTY, "coins token, BTY supported.")
cmd.Flags().Int32P("displaymode", "d", 0, "display mode.(0: display collect. 1:display avaliable detail. 2:display frozen detail. 3:display all")
cmd.Flags().Int32P("displaymode", "d", 0, "display mode.(0: display collect. 1:display available detail. 2:display frozen detail. 3:display all")
}
func showPrivacyAccountInfo(cmd *cobra.Command, args []string) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,7 +38,7 @@ func (policy *privacyPolicy) rescanAllTxAddToUpdateUTXOs() {
go policy.rescanReqTxDetailByAddr(acc.Addr, policy.rescanwg)
}
policy.rescanwg.Wait()
bizlog.Debug("rescanAllTxToUpdateUTXOs sucess!")
bizlog.Debug("rescanAllTxToUpdateUTXOs success!")
}
//从blockchain模块同步addr参与的所有交易详细信息
......@@ -820,7 +820,7 @@ func (policy *privacyPolicy) rescanReqUtxosByAddr(addrs []string) {
defer policy.getWalletOperate().GetWaitGroup().Done()
bizlog.Debug("RescanAllUTXO begin!")
policy.reqUtxosByAddr(addrs)
bizlog.Debug("RescanAllUTXO sucess!")
bizlog.Debug("RescanAllUTXO success!")
}
func (policy *privacyPolicy) reqUtxosByAddr(addrs []string) {
......
This diff is collapsed.
......@@ -344,7 +344,7 @@ func estRetrievePerform(t *testing.T) {
func estRetrieveCancel(t *testing.T) {
fmt.Println("\nTestRetrieveCancel start")
fmt.Println("*This case is used for checking cancel operation\n*Cancel action is done with privkey of account A/B, although the cancel action for A could succeed, but the balance have been transfered by last action with backup a\n*currBalanceA = currBalanceA - 2*fee currBalanceB = currBalanceB + 1e8 - 2*fee")
fmt.Println("*This case is used for checking cancel operation\n*Cancel action is done with privkey of account A/B, although the cancel action for A could succeed, but the balance have been transferred by last action with backup a\n*currBalanceA = currBalanceA - 2*fee currBalanceB = currBalanceB + 1e8 - 2*fee")
defer fmt.Println("TestRetrieveCancel end")
var hashes [][]byte
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -26,6 +26,9 @@ type RPCReplyTradeOrder struct {
BlockTime int64 `protobuf:"varint,14,opt,name=blockTime" json:"blockTime"`
IsSellOrder bool `protobuf:"varint,15,opt,name=isSellOrder" json:"isSellOrder"`
AssetExec string `protobuf:"bytes,16,opt,name=assetExec" json:"assetExec"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
//MarshalJSON :
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,24 +3,55 @@
package types
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// 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 ValNode struct {
PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
Power int64 `protobuf:"varint,2,opt,name=power" json:"power,omitempty"`
Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValNode) Reset() { *m = ValNode{} }
func (m *ValNode) String() string { return proto.CompactTextString(m) }
func (*ValNode) ProtoMessage() {}
func (*ValNode) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (*ValNode) Descriptor() ([]byte, []int) {
return fileDescriptor_38e9a3523ca7e0ea, []int{0}
}
func (m *ValNode) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValNode.Unmarshal(m, b)
}
func (m *ValNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValNode.Marshal(b, m, deterministic)
}
func (m *ValNode) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValNode.Merge(m, src)
}
func (m *ValNode) XXX_Size() int {
return xxx_messageInfo_ValNode.Size(m)
}
func (m *ValNode) XXX_DiscardUnknown() {
xxx_messageInfo_ValNode.DiscardUnknown(m)
}
var xxx_messageInfo_ValNode proto.InternalMessageInfo
func (m *ValNode) GetPubKey() []byte {
if m != nil {
......@@ -37,13 +68,36 @@ func (m *ValNode) GetPower() int64 {
}
type ValNodes struct {
Nodes []*ValNode `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
Nodes []*ValNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValNodes) Reset() { *m = ValNodes{} }
func (m *ValNodes) String() string { return proto.CompactTextString(m) }
func (*ValNodes) ProtoMessage() {}
func (*ValNodes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (*ValNodes) Descriptor() ([]byte, []int) {
return fileDescriptor_38e9a3523ca7e0ea, []int{1}
}
func (m *ValNodes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValNodes.Unmarshal(m, b)
}
func (m *ValNodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValNodes.Marshal(b, m, deterministic)
}
func (m *ValNodes) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValNodes.Merge(m, src)
}
func (m *ValNodes) XXX_Size() int {
return xxx_messageInfo_ValNodes.Size(m)
}
func (m *ValNodes) XXX_DiscardUnknown() {
xxx_messageInfo_ValNodes.DiscardUnknown(m)
}
var xxx_messageInfo_ValNodes proto.InternalMessageInfo
func (m *ValNodes) GetNodes() []*ValNode {
if m != nil {
......@@ -57,26 +111,51 @@ type ValNodeAction struct {
// *ValNodeAction_Node
// *ValNodeAction_BlockInfo
Value isValNodeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,3,opt,name=Ty" json:"Ty,omitempty"`
Ty int32 `protobuf:"varint,3,opt,name=Ty,proto3" json:"Ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ValNodeAction) Reset() { *m = ValNodeAction{} }
func (m *ValNodeAction) String() string { return proto.CompactTextString(m) }
func (*ValNodeAction) ProtoMessage() {}
func (*ValNodeAction) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (*ValNodeAction) Descriptor() ([]byte, []int) {
return fileDescriptor_38e9a3523ca7e0ea, []int{2}
}
func (m *ValNodeAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValNodeAction.Unmarshal(m, b)
}
func (m *ValNodeAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ValNodeAction.Marshal(b, m, deterministic)
}
func (m *ValNodeAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValNodeAction.Merge(m, src)
}
func (m *ValNodeAction) XXX_Size() int {
return xxx_messageInfo_ValNodeAction.Size(m)
}
func (m *ValNodeAction) XXX_DiscardUnknown() {
xxx_messageInfo_ValNodeAction.DiscardUnknown(m)
}
var xxx_messageInfo_ValNodeAction proto.InternalMessageInfo
type isValNodeAction_Value interface {
isValNodeAction_Value()
}
type ValNodeAction_Node struct {
Node *ValNode `protobuf:"bytes,1,opt,name=node,oneof"`
Node *ValNode `protobuf:"bytes,1,opt,name=node,proto3,oneof"`
}
type ValNodeAction_BlockInfo struct {
BlockInfo *TendermintBlockInfo `protobuf:"bytes,2,opt,name=blockInfo,oneof"`
BlockInfo *TendermintBlockInfo `protobuf:"bytes,2,opt,name=blockInfo,proto3,oneof"`
}
func (*ValNodeAction_Node) isValNodeAction_Value() {}
func (*ValNodeAction_BlockInfo) isValNodeAction_Value() {}
func (m *ValNodeAction) GetValue() isValNodeAction_Value {
......@@ -166,12 +245,12 @@ func _ValNodeAction_OneofSizer(msg proto.Message) (n int) {
switch x := m.Value.(type) {
case *ValNodeAction_Node:
s := proto.Size(x.Node)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *ValNodeAction_BlockInfo:
s := proto.Size(x.BlockInfo)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
......@@ -182,13 +261,36 @@ func _ValNodeAction_OneofSizer(msg proto.Message) (n int) {
}
type ReqNodeInfo struct {
Height int64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqNodeInfo) Reset() { *m = ReqNodeInfo{} }
func (m *ReqNodeInfo) String() string { return proto.CompactTextString(m) }
func (*ReqNodeInfo) ProtoMessage() {}
func (*ReqNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (*ReqNodeInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_38e9a3523ca7e0ea, []int{3}
}
func (m *ReqNodeInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqNodeInfo.Unmarshal(m, b)
}
func (m *ReqNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqNodeInfo.Marshal(b, m, deterministic)
}
func (m *ReqNodeInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqNodeInfo.Merge(m, src)
}
func (m *ReqNodeInfo) XXX_Size() int {
return xxx_messageInfo_ReqNodeInfo.Size(m)
}
func (m *ReqNodeInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ReqNodeInfo.DiscardUnknown(m)
}
var xxx_messageInfo_ReqNodeInfo proto.InternalMessageInfo
func (m *ReqNodeInfo) GetHeight() int64 {
if m != nil {
......@@ -198,13 +300,36 @@ func (m *ReqNodeInfo) GetHeight() int64 {
}
type ReqBlockInfo struct {
Height int64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqBlockInfo) Reset() { *m = ReqBlockInfo{} }
func (m *ReqBlockInfo) String() string { return proto.CompactTextString(m) }
func (*ReqBlockInfo) ProtoMessage() {}
func (*ReqBlockInfo) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (*ReqBlockInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_38e9a3523ca7e0ea, []int{4}
}
func (m *ReqBlockInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqBlockInfo.Unmarshal(m, b)
}
func (m *ReqBlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqBlockInfo.Marshal(b, m, deterministic)
}
func (m *ReqBlockInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqBlockInfo.Merge(m, src)
}
func (m *ReqBlockInfo) XXX_Size() int {
return xxx_messageInfo_ReqBlockInfo.Size(m)
}
func (m *ReqBlockInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ReqBlockInfo.DiscardUnknown(m)
}
var xxx_messageInfo_ReqBlockInfo proto.InternalMessageInfo
func (m *ReqBlockInfo) GetHeight() int64 {
if m != nil {
......@@ -221,9 +346,9 @@ func init() {
proto.RegisterType((*ReqBlockInfo)(nil), "types.ReqBlockInfo")
}
func init() { proto.RegisterFile("valnode.proto", fileDescriptor1) }
func init() { proto.RegisterFile("valnode.proto", fileDescriptor_38e9a3523ca7e0ea) }
var fileDescriptor1 = []byte{
var fileDescriptor_38e9a3523ca7e0ea = []byte{
// 261 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0xc3, 0x30,
0x14, 0xc7, 0x97, 0xd6, 0x74, 0xfa, 0xba, 0x0d, 0x09, 0x32, 0xca, 0x4e, 0x25, 0x4c, 0xe9, 0xa9,
......
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